survSL.expreg: Wrapper function for zero-inflated parametric survival...

View source: R/SL_wrappers.R

survSL.expregR Documentation

Wrapper function for zero-inflated parametric survival regression prediction algorithms

Description

These prediciton algorithm use the survreg function from the survival package to estimate parametric survival regressions. See details for specific parametric models.

Usage

survSL.expreg(time, event, X, newX, new.times, obsWeights, ...)

survSL.weibreg(time, event, X, newX, new.times, obsWeights, id, ...)

survSL.loglogreg(time, event, X, newX, new.times, obsWeights, id, ...)

Arguments

time

Observed follow-up time; i.e. minimum of the event and censoring times.

event

Observed event indicator; i.e, whether the follow-up time corresponds to an event or censoring.

X

Training covariate data.frame.

newX

Test covariate data.frame to use for prediction. Should have the same variable names and structure as X.

new.times

Times at which to obtain to obtain the predicted survivals.

obsWeights

Observation weights.

...

Additional ignored arguments.

Details

Parametric regression models assume a particular parametric form for the distribution of the event given covariates, where the covariates contribute in a linear way to one of the parameters of the distribution. Implemented here are currently exponential (survSL.expreg), Weibull (survSL.weibreg), and log-logistic (survSL.loglogreg) regressions.

Note that survival regressions typically assume that the distribution of the event is continuous and strictly positive. Therefore, they will throw errors if there are large discrete components of the observed distribution of the event. Since some survival outcomes have positive mass at zero, we have amended the standard survival regression to include a component at zero, making this a zero-inflated regression model. Specifically, if there are observed event times equal to zero, then a preliminary logistic regression is fit to predict the probability that the event time is exactly zero, and the survival regression is fit to the strictly positive part of the distribution.

Value

pred

Matrix of predictions, with the same number of rows as newX and number of columns equal to the length of new.times. Rows index new observations, and columns index new times at which the survival was computed.

fit

Two-element list including reg.object, the fitted survreg object, and pos.object, the fitted glm object for the probability that the event was positive (or 1 if no zeroes were detected).


tedwestling/survSuperLearner documentation built on Dec. 12, 2024, 4:16 p.m.