plot_calibration_test: Plot calibration test results

Description Usage Arguments Details Value Examples

View source: R/diagnose_fit.R

Description

Display the results of test_calibration in graphical format.

Usage

1
plot_calibration_test(clbr, ci = 0.9)

Arguments

clbr

The output of test_calibration

ci

The size of the confidence intervals. Default is 90%

Details

From the grf documentation:

The forest summary function test_calibration can be used to asses a forest's goodness of fit. A coefficient of 1 for mean.forest.prediction suggests that the mean forest prediction is correct and a coefficient of 1 for differential.forest.prediction suggests that the forest has captured heterogeneity in the underlying signal.

Value

A ggplot2 plot object

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)

 clbr <- test_calibration(cf)
 plot_calibration_test(clbr, ci = 0.95)

## End(Not run)

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