intxmean {precmed} | R Documentation |
Estimate the CATE model using specified scoring methods
Description
Coefficients of the CATE estimated with boosting, linear regression, two regression, contrast regression, random forest, generalized additive model
Usage
intxmean(
y,
trt,
x.cate,
x.init,
x.ps,
score.method = c("boosting", "gaussian", "twoReg", "contrastReg", "gam",
"randomForest"),
ps.method = "glm",
minPS = 0.01,
maxPS = 0.99,
initial.predictor.method = "boosting",
xvar.smooth.init,
xvar.smooth.score,
tree.depth = 2,
n.trees.rf = 1000,
n.trees.boosting = 200,
B = 1,
Kfold = 2,
plot.gbmperf = TRUE,
...
)
Arguments
y |
Observed outcome; vector of size |
trt |
Treatment received; vector of size |
x.cate |
Matrix of |
x.init |
Matrix of |
x.ps |
Matrix of |
score.method |
A vector of one or multiple methods to estimate the CATE score.
Allowed values are: |
ps.method |
A character value for the method to estimate the propensity score.
Allowed values include one of:
|
minPS |
A numerical value (in [0, 1]) below which estimated propensity scores should be
truncated. Default is |
maxPS |
A number above which estimated propensity scores should be trimmed; scalar |
initial.predictor.method |
A character vector for the method used to get initial
outcome predictions conditional on the covariates in |
xvar.smooth.init |
A vector of characters indicating the name of the variables used as
the smooth terms if |
xvar.smooth.score |
A vector of characters indicating the name of the variables used as
the smooth terms if |
tree.depth |
A positive integer specifying the depth of individual trees in boosting
(usually 2-3). Used only if |
n.trees.rf |
A positive integer specifying the number of trees. Used only if
|
n.trees.boosting |
A positive integer specifying the maximum number of trees in boosting
(usually 100-1000). Used only if |
B |
A positive integer specifying the number of time cross-fitting is repeated in
|
Kfold |
A positive integer specifying the number of folds (parts) used in cross-fitting
to partition the data in |
plot.gbmperf |
A logical value indicating whether to plot the performance measures in
boosting. Used only if |
... |
Additional arguments for |
Value
Depending on what score.method is, the outputs is a combination of the following:
result.boosting: Results of boosting fit and best iteration, for trt = 0 and trt = 1 separately
result.gaussian: Linear regression estimator (beta1 - beta0); vector of length p.cate
+ 1
result.twoReg: Two regression estimator (beta1 - beta0); vector of length p.cate
+ 1
result.contrastReg: A list of the contrast regression results with 3 elements:
$delta.contrastReg: Contrast regression DR estimator; vector of length p.cate
+ 1
$sigma.contrastReg: Variance covariance matrix for delta.contrastReg; matrix of size p.cate
+ 1 by p.cate
+ 1
result.randomForest: Results of random forest fit and best iteration, for trt = 0 and trt = 1 separately
result.gam: Results of generalized additive model fit and best iteration, for trt = 0 and trt = 1 separately
best.iter: Largest best iterations for boosting (if used)
fgam: Formula applied in GAM when initial.predictor.method = 'gam'
warn.fit: Warnings occurred when fitting score.method
err.fit:: Errors occurred when fitting score.method