Main Content

Create Cox proportional hazards model

The `fitcox`

function creates a Cox proportional hazards model
for lifetime data. The basic Cox model includes a hazard function
*h*_{0}(*t*) and model coefficients
*b* such that, for predictor `X`

, the hazard rate at time
*t* is

$$h\left({X}_{i},t\right)={h}_{0}(t)\mathrm{exp}\left[{\displaystyle \sum _{j=1}^{p}{x}_{ij}{b}_{j}}\right],$$

where the *b* coefficients do not depend on time.
`fitcox`

infers both the model coefficients *b* and the
hazard rate *h*_{0}(*t*), and stores
them as properties in the resulting `CoxModel`

object.

The full Cox model includes extensions to the basic model, such as hazards with respect to different baselines or the inclusion of stratification variables. See Extension of Cox Proportional Hazards Model.

`coxMdl = fitcox(`

modifies the fit using one or more `X`

,`T`

,`Name,Value`

)`Name,Value`

arguments. For example,
when the data includes censoring (values that are not observed), the
`Censoring`

argument specifies the censored data.

`CoxModel`

| `hazardratio`

| `survival`

| `plotSurvival`

| `linhyptest`

| `coefci`

| `coxphfit`