intxsurv {precmed} | R Documentation |
Estimate the CATE model using specified scoring methods for survival outcomes
Description
Coefficients of the CATE estimated with random forest, boosting, naive Poisson, two regression, and contrast regression
Usage
intxsurv(
y,
d,
trt,
x.cate,
x.ps,
x.ipcw,
yf = NULL,
tau0,
surv.min = 0.025,
score.method = c("randomForest", "boosting", "poisson", "twoReg", "contrastReg"),
ps.method = "glm",
minPS = 0.01,
maxPS = 0.99,
ipcw.method = "breslow",
initial.predictor.method = "randomForest",
tree.depth = 3,
n.trees.rf = 1000,
n.trees.boosting = 150,
B = 3,
Kfold = 5,
plot.gbmperf = TRUE,
error.maxNR = 0.001,
max.iterNR = 100,
tune = c(0.5, 2),
...
)
Arguments
y |
Observed survival or censoring time; vector of size |
d |
The event indicator, normally |
trt |
Treatment received; vector of size |
x.cate |
Matrix of |
x.ps |
Matrix of |
x.ipcw |
Matrix of |
yf |
Follow-up time, interpreted as the potential censoring time; vector of size |
tau0 |
The truncation time for defining restricted mean time lost. |
surv.min |
Lower truncation limit for probability of being censored (positive and very close to 0). |
score.method |
A vector of one or multiple methods to estimate the CATE score.
Allowed values are: |
ps.method |
A character vector 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 |
ipcw.method |
The censoring model. Allowed values are: |
initial.predictor.method |
A character vector for the method used to get initial
outcome predictions conditional on the covariates in |
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 maximum number of trees in random forest.
Used if |
n.trees.boosting |
A positive integer specifying the maximum number of trees in boosting
(usually 100-1000). Used 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 |
error.maxNR |
A numerical value > 0 indicating the minimum value of the mean absolute
error in Newton Raphson algorithm. Used only if |
max.iterNR |
A positive integer indicating the maximum number of iterations in the
Newton Raphson algorithm. Used only if |
tune |
A vector of 2 numerical values > 0 specifying tuning parameters for the
Newton Raphson algorithm. |
... |
Additional arguments for |
Value
Depending on what score.method is, the outputs is a combination of the following:
result.randomForest: Results of random forest fit, for trt = 0 and trt = 1 separately
result.boosting: Results of boosting fit, for trt = 0 and trt = 1 separately
result.poisson: Naive Poisson 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 2 elements:
$delta.contrastReg: Contrast regression DR estimator; vector of length p.cate
+ 1
$converge.contrastReg: Indicator that the Newton Raphson algorithm converged for delta_0
; boolean