Package: causalOT 1.0.4

causalOT: Optimal Transport Weights for Causal Inference

Uses optimal transport distances to find probabilistic matching estimators for causal inference. These methods are described in Dunipace, Eric (2021) <doi:10.48550/arXiv.2109.01991>. The package will build the weights, estimate treatment effects, and calculate confidence intervals via the methods described in the paper. The package also supports several other methods as described in the help files.

Authors:Eric Dunipace [aut, cre]

causalOT_1.0.4.tar.gz
causalOT_1.0.4.zip(r-4.7-x86_64)causalOT_1.0.4.zip(r-4.7-arm64)causalOT_1.0.4.zip(r-4.6-x86_64)causalOT_1.0.4.zip(r-4.6-arm64)causalOT_1.0.4.zip(r-4.5-x86_64)
causalOT_1.0.4.tgz(r-4.6-x86_64)causalOT_1.0.4.tgz(r-4.6-arm64)causalOT_1.0.4.tgz(r-4.5-x86_64)causalOT_1.0.4.tgz(r-4.5-arm64)
causalOT_1.0.4.tar.gz(r-4.7-arm64)causalOT_1.0.4.tar.gz(r-4.7-x86_64)causalOT_1.0.4.tar.gz(r-4.6-arm64)causalOT_1.0.4.tar.gz(r-4.6-x86_64)
causalOT_1.0.4.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
causalOT/json (API)

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

Bug tracker:https://github.com/ericdunipace/causalot/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • pph - An external control trial of treatments for post-partum hemorrhage

On CRAN:

Conda:

cpp

5.47 score 7 stars 21 scripts 615 downloads 21 exports 65 dependencies

Last updated from:9dab550633. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK205
linux-devel-x86_64OK278
source / vignettesOK238
linux-release-arm64OK214
linux-release-x86_64OK209
macos-release-arm64OK158
macos-release-x86_64OK364
macos-oldrel-arm64OK162
macos-oldrel-x86_64OK405
windows-devel-arm64OK311
windows-devel-x86_64OK312
windows-release-arm64OK268
windows-release-x86_64OK211
windows-oldrel-x86_64OK193
wasm-releaseOK168

Exports:barycentric_projectioncalc_weightcotOptionsCRASH3dataHolderDataSimdf2dataHolderentBWOptionsESSestimate_effectHainmuellerLaLondemean_balanceMeasureot_distanceOTProblemPSISPSIS_diagsbwOptionsscmOptionssupported_methods

Dependencies:abindargbackportsBHbitbit64callrCBPScheckmateclicodetoolscorocpp11descdistributionalfarverforeachgenericsggplot2glmnetgluegtableisobanditeratorsjsonlitelabelinglatticelbfgsb3clifecycleloomagrittrMASSMatchItMatrixmatrixStatsnnetnumDerivosqpotelpillarpkgconfigposteriorprocessxpsR6RColorBrewerRcppRcppArmadilloRcppEigenRcppProgressrlangS7safetensorssandwichscalesshapesurvivaltensorAtibbletorchutf8vctrsviridisLitewithrzoo

Using causalOT
Introduction | Setting up the data | Estimating weights | Estimating treatment effects | Model based estimates | Linear models with lm | Barycentric projections | Note | Diagnostics | 1. Effective sample size | 2. Mean balance | 3. Distributional balance | Other methods | Further information | Options? | More complicated models via object-oriented functions

Last update: 2026-02-15
Started: 2022-03-03

Object Oriented COT Objects
Overview | Base functions for OOP | Measure objects | OTProblem objects | A summmary of the steps to solve causal optimal transport problems | An example using federated learning for causal inference | Solving the problem directly | Data sharing restrictions exist | Only moments are available | We can pass other data that respects privacy | Option 1: pass the gradients back | Option 2: create pseudo data at each site and then pass this back to the main site | An example to generalize from one site to another | More general OT problems

Last update: 2023-12-07
Started: 2023-12-07

Readme and manuals

Help Manual

Help pageTopics
Barycentric Projection outcome estimationbarycentric_projection
Estimate causal weightscalc_weight
causalWeights classcausalWeights-class
Extract treatment effect estimatecoef.causalEffect
Options available for the COT methodcotOptions
CRASH3 data exampleCRASH3
dataHolderdataHolder
R6 Data Generating Parent ClassDataSim
df2dataHolderdf2dataHolder
Options for the Entropy Balancing WeightsentBWOptions
Effective Sample SizeESS ESS,causalWeights-method ESS,numeric-method
Estimate treatment effectsestimate_effect
Hainmueller data exampleHainmueller
LaLonde data exampleLaLonde
Standardized absolute mean difference calculationsmean_balance
MeasureMeasure Measure_
Optimal Transport Distanceot_distance ot_distance.array ot_distance.causalWeights ot_distance.matrix ot_distance.torch_tensor
OTProblemOTProblem OTProblem_
plot.causalWeightsplot.causalWeights
An external control trial of treatments for post-partum hemorrhagepph
Predict method for barycentric projection modelspredict.bp
print.dataHolderprint.dataHolder
Pareto-Smoothed Importance SamplingPSIS PSIS,causalWeights-method PSIS,list-method PSIS,numeric-method PSIS_diag PSIS_diag,causalPSIS-method PSIS_diag,causalWeights-method PSIS_diag,list-method PSIS_diag,numeric-method PSIS_diag,psis-method
Options for the SBW methodsbwOptions
Options for the SCM MethodscmOptions
Summary diagnostics for causalWeightsplot.summary_causalWeights print.summary_causalWeights summary.causalWeights
Supported Methodssupported_methods
Get the variance of a causalEffectvcov.causalEffect