CateCI: Method CateCI

Description Usage Arguments Value Examples

Description

Returns the estimated confidence intervals for the CATE.

Usage

 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)

Arguments

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.

Value

A data frame of estimated CATE confidence intervals.

Examples

 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)

soerenkuenzel/causalToolbox documentation built on April 28, 2021, 5:19 a.m.