Learn R Programming

flexsurv (version 0.6)

model.frame.flexsurvreg: Extract original data from flexsurvreg objects.

Description

Extract the data from a model fitted with flexsurvreg.

Usage

## S3 method for class 'flexsurvreg':
model.frame(formula, \dots)
## S3 method for class 'flexsurvreg':
model.matrix(object, par=NULL, \dots)

Arguments

formula
A fitted model object, as returned by flexsurvreg.
object
A fitted model object, as returned by flexsurvreg.
par
String naming the parameter whose linear model matrix is desired. The default value of par=NULL returns a matrix consisting of the model matrices for all models in the object cbinded together, with the inter
...
Further arguments (not used).

Value

  • model.frame returns a data frame with all the original variables used for the model fit. model.matrix returns a design matrix for a part of the model that includes covariates. The required part is indicated by the "par" argument (see above).

See Also

flexsurvreg, model.frame, model.matrix.