Description Usage Arguments Value Examples
Plot a histogram of estimated bias
1 |
results |
The output from |
... |
Additional arguments passed to |
A ggplot2 plot object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## 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)
# fit the model and extract results
cf <- causal_forest(X, Y, W)
results <- tidy_cf(cf)
plot_bias(results, bins = 30)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.