Learn R Programming

causalOT: Optimal transport methods for causal inference

This R package implements the methods described in Optimal transport methods for causal inference.

Installation

This package can be installed in a few ways.

1. devtools

Using the remotes package in R, one can install the package with

remotes::install_github("ericdunipace/causalOT")

2. download and install

After downloading the git package using git clone or by downloading the .zip file from the button above (Code -> Download Zip) and unzipping, you can install the package with

devtools::install("path/to/causalOT")

3. CRAN

A stable version of this package is available on CRAN, but usually this GitHub will have the latest version.

Usage

The functions in the package are built to construct weights to make distributions more same and estimate causal effects. The primary method we recommend is by using optimal transport weights which balance distributions by design. For more information about using this package, see the vignette "Using causalOT".

Reproducing the paper

In the folder inst/Reproduce you can find code and an RMarkdown file to reproduce the figures present in the paper.

Package author

Eric Dunipace

License

This package is licensed under GPL 3.0.

Copy Link

Version

Install

install.packages('causalOT')

Monthly Downloads

288

Version

1.0.2

License

GPL (== 3.0)

Maintainer

Eric Dunipace

Last Published

February 18th, 2024

Functions in causalOT (1.0.2)

cot_solve,likelihoodMethods-method

cot_solve method for likelihoodMethods
cot_solve,gridSearch-method

cot_solve for gridSearch
Measure_

An R6 object for measures
dataHolder

dataHolder
OTProblem

Object Oriented OT Problem
cot_solve,ateClass-method

cot_solve method for ateClass objects
estimate_model

Function to estimate outcome models
coef.causalEffect

Extract treatment effect estimate
pph

An external control trial of treatments for post-partum hemorrhage
data_separate.dataHolder

Title
estimate_effect

Estimate treatment effects
oop_loss_select

Internal function to select appropriate loss function
predict.bp

Predict method for barycentric projection models
calc_weight

Estimate causal weights
ot_distance

Optimal Transport Distance
causalEffect-class

causalEffect class
sbwOptions

Options for the SBW method
DataSim

R6 Data Generating Parent Class
ESS

Effective Sample Size
entBWOptions

Options for the Entropy Balancing Weights
df2dataHolder,ANY,ANY,data.frame-method

df2dataHolder-methods
scmOptions

Options for the SCM Method
print.dataHolder

print.dataHolder
PSIS.causalWeights

PSIS casualWeights class
cotOptions

Options available for the COT method
Hainmueller

Hainmueller data example
CRASH3

CRASH3 data example
dataHolder,dataHolder-method

dataHolder-methods
mean_balance

Standardized absolute mean difference calculations
PSIS

Pareto-Smoothed Importance Sampling
gridSearch-class

gridSearch S4 class
dataHolder-class

dataHolder-class
LaLonde

LaLonde data example
Measure

An R6 Class for setting up measures
supported_methods

Supported Methods
barycentric_projection

Barycentric Projection outcome estimation
df2dataHolder

df2dataHolder
plot.causalWeights

plot.causalWeights
causalOT

An R package to perform causal inference using optimal transport distances.
summary.causalWeights

Summary diagnostics for causalWeights
OTProblem_-class

An R6 class to construct OTProblems
causalWeights-class

causalWeights class
vcov.causalEffect

Get the variance of a causalEffect