Learn R Programming

StratifiedMedicine (version 0.1.3)

PRISM_train: PRISM (Train): Patient Response Identifier for Stratified Medicine

Description

Train the PRISM algorithm given a training set (Y, A, X) and test set (Xtest). Used directly in PRISM and PRISM_resamp.

Usage

PRISM_train(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)

Arguments

Y

The outcome variable. Must be numeric or survival (ex; Surv(time,cens) )

A

Treatment variable. (ex: a=1,...,A, should be numeric). Default is NULL, which searches for prognostic variables (Y~X).

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.

Xtest

Test set. Default is NULL which uses X (training set). Variable types should match X.

family

Outcome type. Options include "gaussion" (default), "binomial", and "survival".

filter

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

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.

submod

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.

param

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".

alpha_ovrl

Two-sided alpha level for overall population. Default=0.05

alpha_s

Two-sided alpha level at subgroup level. Default=0.05

filter.hyper

Hyper-parameters for the Filter function (must be list). Default is NULL.

ple.hyper

Hyper-parameters for the PLE function (must be list). Default is NULL.

submod.hyper

Hyper-parameters for the SubMod function (must be list). Default is NULL.

param.hyper

Hyper-parameters for the Param function (must be list). Default is NULL.

verbose

Detail progress of PRISM? Default=TRUE

Value

Trained PRISM object. Includes filter, ple, submod, and param outputs.

  • filter.mod - Filter model

  • filter.vars - Variables remaining after filtering

  • ple.fit - Fitted ple model (model fit, other fit outputs)

  • mu_train - Patient-level estimates (train)

  • mu_test - Patient-level estimates (test)

  • submod.fit - Fitted submod model (model fit, other fit outputs)

  • Subgrps.train - Training data-set with identified subgroups

  • Subgrps.test - Test data-set with identified subgroups

  • Rules - Subgroup rules / definitions

  • param.dat - Parameter estimates and variablity metrics (depends on param)