Description Usage Arguments Value Author(s) References See Also
Return fitted survival, cumulative hazard or hazard
at a series of times from a fitted flexsurvreg
or
flexsurvspline
model.
1 2 3 
object 
Output from 
X 
Matrix of covariate values to produce fitted values
for. Columns represent different covariates, and rows represent
multiple combinations of covariate values.
For example For “factor” (categorical) covariates, the values of the contrasts
representing factor levels (as returned by the
If there are only factor covariates in the model, then all distinct groups are used by default. If there are any continuous covariates, then a single summary is provided. By default, this is with all covariates set to their mean values in the data  for categorical covariates, the means of the 0/1 indicator variables are taken. 
type 

t 
Times to calculate fitted values for. By default, these are the
sorted unique observation (including censoring) times in the
data. If the corresponding lefttruncation times 
start 
Lefttruncation times, defaults to those corresponding
to the default 
B 
Number of simulations from the normal asymptotic distribution
of the estimates used to calculate confidence intervals. Decrease
for greater speed at the expense of accuracy, or set

cl 
Width of symmetric confidence intervals, relative to 1. 
... 
Further arguments passed to or from other methods. 
A list with one element for each unique covariate value (if there are
only categorical covariates) or one element (if there are no
covariates or any continuous covariates). Each of these elements
is a matrix with one row for each time in t
, giving the
estimated survival (or cumulative hazard, or hazard) and 95%
confidence limits. These list elements are named with the covariate
names and values which define them.
If there are multiple summaries, an additional list component named
X
contains a matrix with the exact values of contrasts (dummy
covariates) defining each summary.
The plot.flexsurvreg
function can be used to quickly
plot these modelbased summaries against empirical summaries such as
KaplanMeier curves, to diagnose model fit.
Confidence intervals for models fitted with flexsurvreg
are obtained by random sampling from the asymptotic normal
distribution of the maximum likelihood estimates (see, e.g. Mandel
(2013)). For models fitted
with flexsurvreg
, intervals for the hazard are obtained
in this way, whereas intervals for the survival and cumulative hazard
are obtained analytically as in Royston and Parmar (2002).
C. H. Jackson chris.jackson@mrcbsu.cam.ac.uk
Royston, P. and Parmar, M. (2002). Flexible parametric proportionalhazards and proportionalodds models for censored survival data, with application to prognostic modelling and estimation of treatment effects. Statistics in Medicine 21(1):21752197.
Mandel, M. (2013). "Simulation based confidence intervals for functions with complicated derivatives." The American Statistician (in press).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.