plot.results: Visualize a causal forest results object

Description Usage Arguments Details Value See Also Examples

View source: R/results.R

Description

Certain plots only require a results object and not the other components of a cf_eval object. These can be created from results only.

Usage

1
2
## S3 method for class 'results'
plot(x, kind, ...)

Arguments

x

A results object

kind

The type of plot to create

...

Additional arguments passed to subsequent plot functions

Details

Possible options for kind are:

cate

A density plot of estimated conditional average treatment effects, i.e. the causal forest predictions. The most straightforward way to look for treatment effect heterogeneity.

bias

A histogram of each observation's contribution to the overall bias of the model, relative to a simple difference in means.

propensities

A histogram of fitted propensities. The causal forest requires the assumption that we cannot deterministically tell the treatment status of an individual given its covariates. In other words, none of the propensity scores should be near zero or one.

Value

A plot

See Also

Other plotting methods: plot.ate(), plot.cf_eval(), plot.tuning_output()

Examples

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

 Xdat <- subset(cfex, select = -c(W, Y))
 X <- make_contrasts(Xdat, 'fct')
 cf <- causal_forest(X, cfex$Y, cfex$W)

 cfe <- cf_eval(cf, Xdat)
 plot(cfe$res, kind = 'bias')

## End(Not run)

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