Learn R Programming

riskRegression (version 2018.04.21)

coxDesign: Extract the design matrix used to train a Cox model

Description

Extract the design matrix used to train a Cox model. Should contain the time of event, the type of event, the variable for the linear predictor, the strata variables and the date of entry (in case of delayed entry).

Usage

coxDesign(object, center)

# S3 method for coxph coxDesign(object, center = FALSE)

# S3 method for phreg coxDesign(object, center = FALSE)

Arguments

object

The fitted Cox regression model object either obtained with coxph (survival package), cph (rms package), or phreg (mets package).

center

logical. Should the variable of the linear predictor be centered ?