Learn R Programming

psc (version 1.2.0)

modelExtract.flexsurvreg: A generic function for extracting model information

Description

This function extracts model information for use with the pscfit.R function.

Usage

# S3 method for flexsurvreg
modelExtract(CFM)

Value

a list of extracted model components. Included are

  • model.frame a dataset of the covareits used to create the model

  • cov_co: covariate coefficients

  • sig: variance-covariance matrix

  • haz_co: hazard parameter coefficients

  • k: number of knots

  • knots: knot position

  • lam: lambda parameter

  • form: model formula

Arguments

CFM

a model of class 'flexsurvreg'

Details

A function for extracting the model information required for using pscfit