predict.flexsurvreg: Predict method for 'flexsurvreg' models

Description Usage Arguments Value

Description

This function returns predictions from a flexsurvreg object. This can be a convenient/faster alternative to summary.flexsurvreg, when the number of observations with unique combinations of covariates is large.

Usage

1
2
3
## S3 method for class 'flexsurvreg'
predict(object, newdata, times, type = "survival",
  start = NULL, ...)

Arguments

object

Object of type flexsurvreg.

newdata

A dataframe to apply predictions to.

times

A numeric vector of times for which to return predictions, with length equal to nrow(newdata)

type

What type of prediction? Options are "survival", "cumhaz", and "hazard".

start

Optional. A numeric vector of start (truncation) times.

...

Ignored.

Value

A numeric vector of predictions


jwdink/tidysurv documentation built on May 20, 2019, 6:24 a.m.