predictProb: Generic function for extracting predicted survival...

Description Usage Arguments Details Value

View source: R/predictProb.R

Description

Generic function for extraction of predicted survival probabilities from a fitted survival model conforming to the interface required by pmpec.

Usage

1
predictProb(object, response, x, ...)

Arguments

object

a fitted survival model.

response

Either a survival object (with Surv(time, status), where time is an n-vector of censored survival times and status an n-vector containing event status, coded with 0 and 1) or a matrix with columns time containing survival times and status containing integers, where 0 indicates censoring, 1 the interesting event and larger numbers other competing risks. In case of binary response, vector with entries 0 and 1.

x

n*p matrix of covariates.

...

additional arguments, for example model complexity or, in case of survival response, argument times, a vector containing evaluation times.

Details

pmpec requires a predictProb.class function for each model fit of class class. It extracts the predicted probability of survival from this model.

See existing predictProb functions, at the time predictProb.CoxBoost, predictProb.coxph and predictProb.survfit.

If desired predictProb function for class class is not available in peperr, but implemented in package pec as predictSurvProb.class, it can easily be transformed as predictProb method.

Value

Matrix with predicted probabilities for each evaluation time point in times (columns) and each new observation (rows).


peperr documentation built on May 19, 2017, 5:27 p.m.

Search within the peperr package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.