plot.ate: Plot a causal forest ATE

Description Usage Arguments Details Value See Also Examples

View source: R/ate.R

Description

Plots the average treatment effect estimated by a causal_forest model.

Usage

1
2
## S3 method for class 'ate'
plot(x, level = NULL, ...)

Arguments

x

An ate object

level

The desired confidence level

...

Additional arguments (ignored)

Details

If level = NULL, the default, no confidence bands will be plotted.

Value

A ggplot2 plot object

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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)
 plot(a)

## End(Not run)

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