ipcwmodel objects contain the fitted model, models fitted on jackknife
samples, the prediction function, training Brier score, and
metadata about the model.
Arguments
- model_name
Character. The name of the model.
- full_model
The fitted model object for the full dataset.
- jackknife_models
List of fitted models, each omitting one observation (the jackknife resamples).
- tau
Numeric. The time horizon at which survival is estimated.
- predict
Function. The prediction function for the fitted model.
- train_brier
Numeric. The Brier score for the fitted model on the training data.
- time_var
Character. The name of the time variable in the data.
- status_var
Character. The name of the status variable in the data.
- training_vars
Character vector. The names of the covariates used for model fitting.
- w
Numeric vector. The IPCW weights used for model fitting.
- additional_information
List. Additional information to be stored in the model object (default is an empty list).
- object
An object of class
ipcwmodel.- newdata
A data frame containing the covariates for which predictions are to be made.
- naive
Logical. If
TRUE, use the naive jackknife variance estimator. IfFalse, use the IPCW-weighted estimator.- z
Numeric. The z-score to use for the confidence interval. Default is 1.96, corresponding to a 95% confidence interval.
- ...
Additional arguments (currently ignored).
Details
Models can be used by calling the predict(model, newdata) method.
It returns a data frame with columns for the
prediction prediction, lower lower and upper upper Wald
confidence intervals, and standard error se. The function can also take
an optional argument z for the z-score used in confidence
interval calculation.
The confidence intervals and standard errors can be computed using either
the naive approach (using the number of jackknife models minus one as the
denominator) or the robust approach (using the IPCW weights). This
is controlled by the naive argument in the predict method.
The Wald confidence intervals are calculated on the logit scale.
See IPCWJK for more information.