cea_forest: Estimate causal forests for outcomes, costs and net monetary...

Description Usage Arguments Value References Examples

View source: R/cea_forest.R

Description

cea_forest Runs causal forests for outcomes, costs and net monetary benefits given a specified willingness to pay (a wrapper for grf::causal_forest).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
cea_forest(
  Y,
  C,
  X,
  W,
  Z = NULL,
  WTP = NULL,
  W.hat = NULL,
  tune.parameters = "all",
  num.trees = 5000,
  ...
)

Arguments

Y

The outcome vector.

C

The cost vector.

X

The covariate matrix.

W

The treatment vector.

Z

An instrumental variable. (Optional)

WTP

Willingness to pay per one-unit increase in the outcome. Defaults to 1.

W.hat

Pre-fitted propensity scores for treatment (W). If NULL, the algorithm fits a regression forest to estimate W.hat.

tune.parameters

Which hyperparameters to tune. Defaults to "all". See grf::causal_forest for other options. Option "none" uses default settings for all parameters.

num.trees

The number of trees in each forest. Defaults to 5000. Can (and probably should) be set to a higher number to reduce Monte Carlo errors.

...

Other options to be passed to grf::causal_forest() or grf::instrumenal_forest() if instrument is supplied.

Value

Returns a list containing three causal forest objects (one for the outcome, one for costs, and one for net monetary benefits). If an instrument is supplied, the code returns three corresponding instrumental forest objects.

References

Athey, S., Tibshirani, J., & Wager, S. (2019). Generalized random forests. The Annals of Statistics, 47(2), 1148-1178.

Examples

1
2
3
4
## Not run: 
To be added...

## End(Not run)

bonander/CEAforests documentation built on April 1, 2021, 10:57 a.m.