Learn R Programming

StratifiedMedicine (version 0.2.3)

submod_weibull: Subgroup Identification: Model-based partitioning (Weibull)

Description

Uses the MOB (with weibull loss function) algorithm to identify subgroups (Zeileis, Hothorn, Hornik 2008; Seibold, Zeileis, Hothorn 2016). Usable for survival outcomes.

Usage

submod_weibull(Y, A, X, Xtest, mu_train, alpha = 0.05,
  minsize = floor(dim(X)[1] * 0.1), maxdepth = 4, parm = NULL, ...)

Arguments

Y

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

A

Treatment variable. (a=1,...A)

X

Covariate space.

Xtest

Test set

mu_train

Patient-level estimates (See PLE_models)

alpha

Significance level for variable selection (default=0.05)

minsize

Minimum number of observations in a tree node. Default = floor( dim(train)[1]*0.05 )

maxdepth

Maximum depth of any node in the tree (default=4)

parm

Model parameters included in parameter instability tests (default=NULL, all parameters)

...

Any additional parameters, not currently passed through.

Value

Trained MOB (Weibull) model.

  • mod - MOB (Weibull) model object

References

  • Zeileis A, Hothorn T, Hornik K (2008). Model-Based Recursive Partitioning. Journal of Computational and Graphical Statistics, 17(2), 492<U+2013>514.

  • Seibold H, Zeileis A, Hothorn T. Model-based recursive partitioning for subgroup analyses. Int J Biostat, 12 (2016), pp. 45-63

Examples

Run this code
# NOT RUN {

# }
# NOT RUN {
library(StratifiedMedicine)
library(survival)

## Load TH.data (no treatment; generate treatment randomly to simulate null effect) ##
data("GBSG2", package = "TH.data", envir = e <- new.env() )
surv.dat = e$GBSG2
## Design Matrices ###
Y = with(surv.dat, Surv(time, cens))
X = surv.dat[,!(colnames(surv.dat) %in% c("time", "cens")) ]
A = rbinom( n = dim(X)[1], size=1, prob=0.5  )
res_weibull = submod_weibull(Y, A, X, Xtest=X, family="survival")
plot(res_weibull$mod)
# }
# NOT RUN {

# }

Run the code above in your browser using DataLab