coxphfit
Cox proportional hazards regression
Description
returns
a p-by-1 vector, b
= coxphfit(X
,T
)b
, of coefficient
estimates for a Cox proportional hazards
regression of the observed responses T
on
the predictors X
, where T
is
either an n-by-1 vector or an n-by-2
matrix, and X
is an n-by-p matrix.
The model does not include a constant term, and X
cannot
contain a column of 1s.
returns
a vector of coefficient estimates, with additional options specified
by one or more b
= coxphfit(X
,T
,Name,Value
)Name,Value
pair arguments.
[
also returns the loglikelihood, b
,logl
,H
,stats
]
= coxphfit(___)logl
,
a structure, stats
, that contains additional statistics,
and a two-column matrix, H
, that contains the T
values
in the first column and the estimated baseline cumulative hazard,
in the second column. You can use any of the input arguments in the
previous syntaxes.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
More About
Algorithms
If you want to compute the baseline cumulative hazard rate (
H
) for a stratum, the input data for the stratum must contain at least one fully observed observation. If a stratum has only censored observations, the outputH
includes a row withNaN
s in the first two columns and the stratum information in the remaining columns.Before R2022a: If a stratum has only censored observations,
H
includes a row of zeros and no stratum information.
References
[1] Cox, D.R., and D. Oakes. Analysis of Survival Data. London: Chapman & Hall, 1984.
[2] Lawless, J. F. Statistical Models and Methods for Lifetime Data. Hoboken, NJ: Wiley-Interscience, 2002.
[3] Kleinbaum, D. G., and M. Klein. Survival Analysis. Statistics for Biology and Health. 2nd edition. Springer, 2005.