Based on initial PRISM fit (PRISM_train
), run resampling (Boostrap, Permutation,
or cross-validation). Used directly in PRISM
.
PRISM_resamp(PRISM.fit, Y, A, X, Xtest = NULL, family = "gaussian",
filter = "filter_glmnet", ple = NULL, submod = NULL,
param = NULL, alpha_ovrl = 0.05, alpha_s = 0.05,
filter.hyper = NULL, ple.hyper = NULL, submod.hyper = NULL,
param.hyper = NULL, verbose = TRUE, prefilter_resamp = FALSE,
resample = NULL, R = 100, stratify = TRUE)
Fitted PRISM model
The outcome variable. Must be numeric or survival (ex; Surv(time,cens) )
Treatment variable. (ex: a=1,...,A, should be numeric). Default is NULL, which searches for prognostic variables (Y~X).
Covariate space. Variables types (ex: numeric, factor, ordinal) should be set to align with subgroup model (submod argument). For example, for lmtree, binary variables coded as numeric (ex: 0, 1) are treated differently than the corresponding factor version (ex: "A", "B"). Filter and PLE models provided in the StratifiedMedicine package can accomodate all variable types.
Test set. Default is NULL which uses X (training set). Variable types should match X.
Outcome type. Options include "gaussion" (default), "binomial", and "survival".
Maps (Y,A,X) => (Y,A,X.star) where X.star has potentially less covariates than X. Default is "filter_glmnet", "None" uses no filter.
PLE (Patient-Level Estimate) function. Maps the observed data to PLEs. (Y,A,X) ==> PLE(X). Default for "gaussian"/"binomial" is "ple_ranger" (treatment-specific random forest models). The default for "survival" is "ple_glmnet" (elastic net (glmnet) cox regression). "None" uses no ple.
Subgroup identification model function. Maps the observed data and/or PLEs to subgroups. Default of "gaussian"/"binomial" is "submod_lmtree" (MOB with OLS loss). Default for "survival" is "submod_weibull" (MOB with weibull loss). "None" uses no submod.
Parameter estimation and inference function. Based on the discovered subgroups, perform inference through the input function (by name). Default for "gaussian"/"binomial" is "param_PLE", default for "survival" is "param_cox".
Two-sided alpha level for overall population. Default=0.05
Two-sided alpha level at subgroup level. Default=0.05
Hyper-parameters for the Filter function (must be list). Default is NULL.
Hyper-parameters for the PLE function (must be list). Default is NULL.
Hyper-parameters for the SubMod function (must be list). Default is NULL.
Hyper-parameters for the Param function (must be list). Default is NULL.
Detail progress of PRISM? Default=TRUE
Option to filter the covariate space (based on filter model) prior to resampling. Default=FALSE.
Resampling method for resample-based estimates and variability metrics. Options include "Boostrap", "Permutation", and "CV". Default=NULL (No resampling).
Number of resamples (default=100)
Stratified resampling (Default=TRUE)
Trained PRISM object. Includes filter, ple, submod, and param outputs.
param.dat - Parameter estimates and variablity metrics (depends on param)
resamp.dist - - Resampling distributions