plot_propensities: Plot a histogram of fitted propensities

Description Usage Arguments Value Examples

View source: R/diagnose_overlap.R

Description

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.

Usage

1

Arguments

results

A trained causal forest object from causal_forest

...

Additional arguments to be passed to geom_histogram

Value

A ggplot2 plot object

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)

 plot_propensities(cf)

## End(Not run)

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