Description Usage Arguments Value Examples
Returns the estimated confidence intervals for the CATE.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | CateCI(theObject, feature_new, method = "maintain_group_ratios",
bootstrapVersion = "normalApprox", B = 2000, nthread = 0,
verbose = TRUE)
## S4 method for signature 'CATEestimator'
CateCI(theObject, feature_new,
method = "maintain_group_ratios", bootstrapVersion = "normalApprox",
B = 2000, nthread = 0, verbose = TRUE)
## S4 method for signature 'S_BART'
CateCI(theObject, feature_new, verbose = FALSE)
## S4 method for signature 'X_BART'
CateCI(theObject, feature_new, verbose = FALSE)
## S4 method for signature 'T_BART'
CateCI(theObject, feature_new, verbose = FALSE)
## S4 method for signature 'M_BART'
CateCI(theObject, feature_new, verbose = FALSE)
|
theObject |
A 'MetaLearner' object. |
feature_new |
A feature data frame. |
method |
Different versions of the bootstrap. |
bootstrapVersion |
Default is normalApprox, which will use the bootstrap normal approximation to get CI. Smoothed will use CI around the smoothed bootstrap as introduced by Efron 2014. |
B |
Number of bootstrap samples. |
nthread |
Number of threads to be used in parallel. |
verbose |
TRUE for detailed output, FALSE for no output. |
A data frame of estimated CATE confidence intervals.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
require(causalToolbox)
# create example data set
simulated_experiment <- simulate_causal_experiment(
ntrain = 1000,
ntest = 1000,
dim = 10
)
feat <- simulated_experiment$feat_tr
tr <- simulated_experiment$W_tr
yobs <- simulated_experiment$Yobs_tr
feature_test <- simulated_experiment$feat_te
# create the CATE estimator using Random Forests (RF)
xl_rf <- X_RF(feat = feat, tr = tr, yobs = yobs)
CateCI(xl_rf, feature_test, B = 500)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.