arg.checks {precmed} | R Documentation |
Check arguments
Catered to all types of outcome
Apply at the beginning of pmcount()
, cvcount()
, drcount.inference()
, catefitsurv()
, catecvsurv()
, and drsurv.inference()
Description
Check arguments
Catered to all types of outcome
Apply at the beginning of pmcount()
, cvcount()
, drcount.inference()
, catefitsurv()
, catecvsurv()
, and drsurv.inference()
Usage
arg.checks(
fun,
response,
data,
followup.time = NULL,
tau0 = NULL,
surv.min = NULL,
ipcw.method = NULL,
ps.method,
minPS,
maxPS,
higher.y = NULL,
score.method = NULL,
abc = NULL,
prop.cutoff = NULL,
prop.multi = NULL,
train.prop = NULL,
cv.n = NULL,
error.max = NULL,
max.iter = NULL,
initial.predictor.method = NULL,
tree.depth = NULL,
n.trees.rf = NULL,
n.trees.boosting = NULL,
B = NULL,
Kfold = NULL,
plot.gbmperf = NULL,
error.maxNR = NULL,
max.iterNR = NULL,
tune = NULL,
n.boot = NULL,
plot.boot = NULL,
interactions = NULL
)
Arguments
fun |
A function for which argument check is needed; "catefit" for |
response |
The type of response. Always 'survival' for this function. |
data |
A data frame containing the variables in the outcome and propensity score models;
a data frame with |
followup.time |
Follow-up time, interpreted as the potential censoring time. If the potential censoring time is known,
followup.time is the name of a corresponding column in the data. Otherwise, set |
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). |
ipcw.method |
The censoring model. 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 numerical value (in (0, 1]) above which estimated propensity scores should be
truncated. Must be strictly greater than |
higher.y |
A logical value indicating whether higher ( |
score.method |
A vector of one or multiple methods to estimate the CATE score.
Allowed values are: |
abc |
A logical value indicating whether the area between curves (ABC) should be calculated
at each cross-validation iterations, for each |
prop.cutoff |
A vector of numerical values (in (0, 1]) specifying percentiles of the
estimated log CATE scores to define nested subgroups. Each element represents the cutoff to
separate observations in nested subgroups (below vs above cutoff).
The length of |
prop.multi |
A vector of numerical values (in [0, 1]) specifying percentiles of the
estimated log CATE scores to define mutually exclusive subgroups.
It should start with 0, end with 1, and be of |
train.prop |
A numerical value (in (0, 1)) indicating the proportion of total data used
for training. Default is |
cv.n |
A positive integer value indicating the number of cross-validation iterations.
Default is |
error.max |
A numerical value > 0 indicating the tolerance (maximum value of error)
for the largest standardized absolute difference in the covariate distributions or in the
doubly robust estimated rate ratios between the training and validation sets. This is used
to define a balanced training-validation splitting. Default is |
max.iter |
A positive integer value indicating the maximum number of iterations when
searching for a balanced training-validation split. Default is |
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. |
n.boot |
A numeric value indicating the number of bootstrap samples used. This is only relevant
if |
plot.boot |
A logic value indicating whether histograms of the bootstrapped log(rate ratio) should
be produced at every |
interactions |
A logical value indicating whether the outcome model should assume interactions
between |
Value
Nothing. Will stop if arguments are incorrect.