vim | R Documentation |
Estimate AUC VIM
vim(
type,
time,
event,
X,
landmark_times = stats::quantile(time[event == 1], probs = c(0.25, 0.5, 0.75)),
restriction_time = max(time[event == 1]),
approx_times = NULL,
large_feature_vector,
small_feature_vector,
conditional_surv_preds = NULL,
large_oracle_preds = NULL,
small_oracle_preds = NULL,
conditional_surv_generator = NULL,
conditional_surv_generator_control = NULL,
large_oracle_generator = NULL,
large_oracle_generator_control = NULL,
small_oracle_generator = NULL,
small_oracle_generator_control = NULL,
cf_folds = NULL,
cf_fold_num = 5,
sample_split = TRUE,
ss_folds = NULL,
robust = TRUE,
scale_est = FALSE,
alpha = 0.05,
verbose = FALSE
)
type |
Type of VIM to compute. Options include |
time |
|
event |
|
X |
|
landmark_times |
Numeric vector of length J1 giving
landmark times at which to estimate VIM ( |
restriction_time |
Maximum follow-up time for calculation of |
approx_times |
Numeric vector of length J2 giving times at which to approximate integrals. Defaults to a grid of 100 timepoints, evenly spaced on the quantile scale of the distribution of observed event times. |
large_feature_vector |
Numeric vector giving indices of features to include in the 'large' prediction model. |
small_feature_vector |
Numeric vector giving indices of features to include in the 'small' prediction model. Must be a
subset of |
conditional_surv_preds |
User-provided estimates of the conditional survival functions of the event and censoring
variables given the full covariate vector (if not using the |
large_oracle_preds |
User-provided estimates of the oracle prediction function using |
small_oracle_preds |
User-provided estimates of the oracle prediction function using |
conditional_surv_generator |
A user-written function to estimate the conditional survival functions of the event and censoring variables. Must take arguments
|
conditional_surv_generator_control |
A list of arguments to pass to |
large_oracle_generator |
A user-written function to estimate the oracle prediction function using |
large_oracle_generator_control |
A list of arguments to pass to |
small_oracle_generator |
A user-written function to estimate the oracle prediction function using |
small_oracle_generator_control |
A list of arguments to pass to |
cf_folds |
Numeric vector of length |
cf_fold_num |
The number of cross-fitting folds, if not providing |
sample_split |
Logical indicating whether or not to sample split |
ss_folds |
Numeric vector of length |
robust |
Logical, whether or not to use the doubly-robust debiasing approach. This option
is meant for illustration purposes only — it should be left as |
scale_est |
Logical, whether or not to force the VIM estimate to be nonnegative |
alpha |
The level at which to compute confidence intervals and hypothesis tests. Defaults to 0.05 |
verbose |
Whether to print progress messages. |
Named list with the following elements:
result |
Data frame giving results. See the documentation of the individual |
folds |
A named list giving the cross-fitting fold IDs ( |
approx_times |
A vector of times used to approximate integrals appearing in the form of the VIM estimator. |
conditional_surv_preds |
A named list containing the estimated conditional event and censoring survival functions. |
large_oracle_preds |
A named list containing the estimated large oracle prediction function. |
small_oracle_preds |
A named list containing the estimated small oracle prediction function. |
vim_accuracy vim_AUC vim_brier vim_cindex vim_rsquared vim_survival_time_mse
# This is a small simulation example
set.seed(123)
n <- 100
X <- data.frame(X1 = rnorm(n), X2 = rbinom(n, size = 1, prob = 0.5))
T <- rexp(n, rate = exp(-2 + X[,1] - X[,2] + .5 * X[,1] * X[,2]))
C <- rexp(n, exp(-2 -.5 * X[,1] - .25 * X[,2] + .5 * X[,1] * X[,2]))
C[C > 15] <- 15
time <- pmin(T, C)
event <- as.numeric(T <= C)
# landmark times for AUC
landmark_times <- c(3)
output <- vim(type = "AUC",
time = time,
event = event,
X = X,
landmark_times = landmark_times,
large_feature_vector = 1:2,
small_feature_vector = 2,
conditional_surv_generator_control = list(SL.library = c("SL.mean", "SL.glm")),
large_oracle_generator_control = list(SL.library = c("SL.mean", "SL.glm")),
small_oracle_generator_control = list(SL.library = c("SL.mean", "SL.glm")),
cf_fold_num = 2,
sample_split = FALSE,
scale_est = TRUE)
print(output$result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.