Package: causaldef 0.2.0

causaldef: Decision-Theoretic Causal Diagnostics via Le Cam Deficiency

Implements Le Cam deficiency theory for causal inference, as described in Akdemir (2026) <doi:10.5281/zenodo.18367347>. Provides theorem-backed bounds together with computable proxy diagnostics for information loss from confounding, selection bias, and distributional shift. Supports continuous, binary, count, survival, and competing risks outcomes. Key features include propensity-score total-variation deficiency proxies, negative control diagnostics, policy regret bounds, and sensitivity analysis via confounding frontiers.

Authors:Deniz Akdemir [aut, cre]

causaldef_0.2.0.tar.gz
causaldef_0.2.0.zip(r-4.7)causaldef_0.2.0.zip(r-4.6)causaldef_0.2.0.zip(r-4.5)
causaldef_0.2.0.tgz(r-4.6-any)causaldef_0.2.0.tgz(r-4.5-any)
causaldef_0.2.0.tar.gz(r-4.7-any)causaldef_0.2.0.tar.gz(r-4.6-any)
causaldef_0.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
causaldef/json (API)

# Install 'causaldef' in R:
install.packages('causaldef', repos = c('https://denizakdemir.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/denizakdemir/causaldef/issues

Datasets:

On CRAN:

Conda:

5.34 score 181 downloads 25 exports 19 dependencies

Last updated from:9973d26f94. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK209
source / vignettesOK225
linux-release-x86_64OK185
macos-release-arm64OK198
macos-oldrel-arm64OK201
windows-develOK278
windows-releaseOK283
windows-oldrelOK293
wasm-releaseOK123

Exports:audit_datacausal_speccausal_spec_competingcausal_spec_survivalconfounding_frontiercreate_plumber_apicreate_shiny_app_filesestimate_deficiencyestimate_deficiency_competingestimate_effectfrontdoor_effectiv_effectnc_diagnosticoverlap_diagnosticpartial_id_setpolicy_regret_boundpolicy_regret_bound_vcrkhs_rate_boundrun_causaldef_apirun_causaldef_appsharp_lower_boundtest_instrumenttransport_deficiencyvalidate_causal_specwasserstein_deficiency_gaussian

Dependencies:backportscheckmateclicpp11farverggplot2gluegtableisobandlabelinglifecycleR6RColorBrewerrlangS7scalesvctrsviridisLitewithr

Classical Benchmarks: Lalonde and RHC
1. Lalonde's NSW Benchmark | Data Preparation | Deficiency Estimation | 2. Right Heart Catheterization (RHC) | Data Setup | Quantifying the Information Gap | Policy Regret Bounds | Confounding Frontier

Last update: 2026-03-23
Started: 2026-02-02

Complete Workflow: From Data to Decision
Overview | Part 1: Gene Perturbation Study (Continuous Outcome) | 1.1 Data Description | 1.2 Step 1: Specification | 1.3 Step 2: Deficiency Estimation | 1.4 Step 3: Diagnose with Negative Control | 1.5 Step 4: Policy Decision | 1.6 Effect Estimation | Part 2: Hematopoietic Cell Transplantation (Survival Outcome) | 2.1 Data Description | 2.2 Step 1: Survival Specification | 2.3 Step 2: Deficiency Estimation | 2.4 Step 3: Confounding Frontier | 2.5 Step 4: Policy Regret and RMST Effect | 2.6 Complete Decision Framework | Part 3: Comparative Analysis Across Studies | 3.1 When Is Observational Evidence Sufficient? | 3.2 General Workflow Summary | References

Last update: 2026-03-23
Started: 2026-02-02

Introduction to causaldef
The Core Workflow | Example: Gene Perturbation Analysis | 1. Specification | 2. Deficiency Estimation | 3. Diagnose with Negative Controls | 4. Decision Making | 5. Effect Estimation

Last update: 2026-03-23
Started: 2026-01-30

Negative Control Diagnostics in causaldef
Introduction | Theoretical Background | What is a Negative Control Outcome? | The Diagnostic Logic | Negative Control Sensitivity Bound (manuscript thm:nc_bound) | Practical Example | Simulating Data with a Negative Control | Creating the Causal Specification | Running the Negative Control Diagnostic | Interpreting the Results | Scenarios | Scenario 1: Adjustment Succeeds | Scenario 2: Adjustment Fails | Choosing Good Negative Control Outcomes | Ideal Properties | Examples by Domain | Combining with Deficiency Estimation | Advanced: Estimating Kappa | Summary | References

Last update: 2026-03-23
Started: 2026-02-02

Sensitivity Analysis: Deficiency vs. E-values
Introduction | Conceptual Translation | The E-value Perspective | The Deficiency Perspective | Conceptual Mapping | Practical Example | Setup | Deficiency Estimation | Confounding Frontier | Policy Regret Bound | Comparison with E-values | Computing an Approximate E-value | Deficiency vs. E-value: Key Differences | When to Use Each | Extended Sensitivity Analysis | Benchmarking Observed Covariates | Combining with Negative Controls | Summary: Unified Sensitivity Analysis | References

Last update: 2026-03-23
Started: 2026-02-02

Survival Analysis with causaldef
Survival Specification | Analysis of HCT Outcomes: Competing Risks | Data Preparation | Specification | Deficiency Estimation | Survival Modeling and RMST | Quantifying Uncertainty: Policy Regret Bounds | Connection to Deficiency

Last update: 2026-03-23
Started: 2026-01-30

The causaldef Methodology: Theory and Practice
Introduction: The Safety Manifesto | Flash Forward: The Destination | The Core Theory: Markov Kernels in Plain English | Theory Overview: The Car and Destination Analogy | Workflow | Step 1: Data Generation | Step 2: Specification | Step 3: Deficiency Estimation | Interpretation of Deficiency Results: The Distance to Walk | Step 4: Diagnostics (The "Negative Control Trap") | Critical Interpretation: The Deductible | Step 5: Effect Estimation | Step 6: Policy Regret Bounds (Transfer Penalty and Safety Floor) | Decision Framework | Step 7: Sensitivity Analysis & Decision | Go/No-Go Decision | Advanced: Survival Analysis | Conclusion

Last update: 2026-03-23
Started: 2026-01-30

Transportability and Policy Learning
1. Transportability: Lalonde's Job Training | Transport Deficiency | 2. Policy Learning Bounds: RHC | Policy Evaluation | The Safety Floor

Last update: 2026-03-23
Started: 2026-02-02

Automated Data Auditing for Causal Studies
Why Audit Your Data? | Case Study: Right Heart Catheterization (RHC) | Understanding the Research Question | Running the Data Audit | Interpreting the Report | Examining Detected Issues | Clinical Interpretation | Comparing Audit Results Across Subsets | Using Audit Results for Causal Analysis | Full Audit Summary | Best Practices for Data Auditing | Conclusion | References

Last update: 2026-02-11
Started: 2026-02-11

Policy Learning with Decision-Theoretic Bounds
Introduction | The Safety Floor Concept | Implications for AI/ML Safety | Practical Workflow | Step 1: Define the Causal Problem | Step 2: Estimate Deficiency | Step 3: Visualize Deficiency | Step 4: Compute Policy Regret Bounds | Step 5: Visualize the Safety Floor | Interpreting the Results | The Safety Floor Report | Sensitivity Analysis with Confounding Frontiers | Visualize the Frontier | Policy Learning with grf (Optional) | Best Practices for Safe Deployment | Pre-Deployment Checklist | Monitoring in Production | Mathematical Details | Policy Regret Transfer (Manuscript) | Why This Matters | Summary | References

Last update: 2026-02-11
Started: 2026-02-02

Advanced Causal Analysis
Introduction | Unobserved Confounding and Negative Controls | Loading the Data | Running the Negative Control Diagnostic | Addressing the Falsification | Sensitivity Analysis: Confounding Frontiers | Visualizing the Frontier | Conclusion

Last update: 2026-01-30
Started: 2026-01-30

Readme and manuals

Help Manual

Help pageTopics
causaldef: Decision-Theoretic Causal Diagnostics via Le Cam Deficiencycausaldef-package causaldef
Audit Data for Causal Validityaudit_data
Create a Causal Problem Specificationcausal_spec
Causal Specification for Competing Riskscausal_spec_competing
Create a Survival Causal Specificationcausal_spec_survival
Map the Confounding Frontierconfounding_frontier
Create Plumber API for CausalDefcreate_plumber_api
Create Standalone Shiny App Filescreate_shiny_app_files
Estimate a Deficiency Proxy (PS-TV)estimate_deficiency
Estimate Deficiency for Competing Risksestimate_deficiency_competing
Estimate Causal Effects from Deficiency Objectsestimate_effect estimate_effect.deficiency
Front-Door Adjustment Kernelfrontdoor_effect
Gene Expression Perturbation Datagene_perturbation
Hematopoietic Cell Transplantation Outcomeshct_outcomes
Instrumental Variable Effect Estimationiv_effect
Negative Control Diagnosticnc_diagnostic
Lalonde National Supported Work (NSW) Benchmarknsw_benchmark
Overlap Diagnosticoverlap_diagnostic
Partial Identification Set from a Delta Radius (Result 8)partial_id_set
Plot Causal Effectplot.causal_effect
Plot Confounding Frontierplot.confounding_frontier
Plot Deficiency Estimatesplot.deficiency
Plot Negative Control Sensitivity Analysisplot.nc_diagnostic_sensitivity
Plot Policy Regret Boundplot.policy_bound
Plot method for transport_deficiencyplot.transport_deficiency
Compute Policy Regret Boundspolicy_regret_bound
Policy Regret Bound with VC Term (Result 3)policy_regret_bound_vc
Print method for causal_effectprint.causal_effect
Print method for causal_specprint.causal_spec
Print method for causal_spec_competingprint.causal_spec_competing
Print method for causal_spec_survivalprint.causal_spec_survival
Print method for confounding_frontierprint.confounding_frontier
Print method for data_audit_reportprint.data_audit_report
Print method for deficiencyprint.deficiency
Print method for frontdoor_effectprint.frontdoor_effect
Print method for iv_effectprint.iv_effect
Print method for nc_diagnosticprint.nc_diagnostic
Print method for overlap_diagnosticprint.overlap_diagnostic
Print method for partial_id_setprint.partial_id_set
Print method for policy_boundprint.policy_bound
Print method for transport_deficiencyprint.transport_deficiency
Right Heart Catheterization (RHC) Datasetrhc
RKHS Rate Bound (Result 1)rkhs_rate_bound
Run CausalDef API Serverrun_causaldef_api
Launch CausalDef Shiny Dashboardrun_causaldef_app
Sharp Two-Point Bounds (Result 4)sharp_lower_bound
Summary method for iv_effectsummary.iv_effect
Test Instrument Validitytest_instrument
Transport Diagnostic Between Source and Target Populationstransport_deficiency
Validate Causal Specificationvalidate_causal_spec
Wasserstein Deficiency (Linear Gaussian) (Result 6)wasserstein_deficiency_gaussian