ate: Estimate average treatment effects using a causal forest

Description Usage Arguments Value Examples

View source: R/ate.R

Description

A thin wrapper around average_treatment_effect. Defines the ate class so that confidence intervals and plots can be created using generics.

Usage

1
ate(fit, ...)

Arguments

fit

A trained causal_forest object

...

Additional parameters to be passed to average_treatment_effect

Value

An instance of the ate class, which is essentialy a one-row tibble with columns estimate and std.err

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
 require(grf)

 n <- 2000; p <- 10

 X <- matrix(rnorm(n * p), n, p)
 W <- rbinom(n, 1, 0.4 + 0.2 * (X[, 1] > 0))
 Y <- pmax(X[, 1], 0) * W + X[, 2] + pmin(X[, 3], 0) + rnorm(n)

 cf <- causal_forest(X, Y, W)
 a <- ate(cf, target.sample = 'treated')

## End(Not run)

ensley-nexant/cfeval documentation built on May 20, 2020, 12:34 a.m.