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

View source: R/flexsurvreg.R

model.frame.flexsurvregR Documentation

Extract original data from flexsurvreg objects.


Extract the data from a model fitted with flexsurvreg.


## S3 method for class 'flexsurvreg'
model.frame(formula, ...)

## S3 method for class 'flexsurvreg'
model.matrix(object, par = NULL, ...)



A fitted model object, as returned by flexsurvreg.


Further arguments (not used).


A fitted model object, as returned by flexsurvreg.


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 intercepts excluded. This is not really a “model matrix” in the usual sense, however, the columns directly correspond to the covariate coefficients in the matrix of estimates from the fitted model.


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).


C. H. Jackson

See Also

flexsurvreg, model.frame, model.matrix.

flexsurv documentation built on Feb. 16, 2023, 5:07 p.m.