\HeaderA{basehaz}{Compute the baseline survival curve for a Cox model}{basehaz}
\keyword{survival}{basehaz}
\begin{Description}\relax
Compute the baseline survival curve for a Cox model.
\end{Description}
\begin{Usage}
\begin{verbatim}
basehaz(fit, centered = TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{fit}] The result of a \code{coxph} fit.
\item[\code{centered}] If TRUE, the resultant curve is for a hypothetical
subject whose covariate values are the corresponding means from the
original data, otherwise for a hypothetical subject with a mean
vector of zero.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function exists primarily because users will look for the phrase
'baseline hazard' (often SAS converts looking for familiar
keywords.) The primary function for creating a survival curve is
\code{survfit}, which this calls.  See that manual page for more
options, including confidence limits and the ability to use other
covariate vectors.  The result of \code{survfit} also has print, plot
and summary methods that make it far more useful.
\end{Details}
\begin{Value}
a data frame with components
\begin{ldescription}
\item[\code{time}] The sorted vector of unique time points (those at which an
event occurred
\item[\code{hazard}] The baseline hazard function
\item[\code{strata}] If \code{fit} was a stratified Cox model, the strata.
There will be one survival curve per strata.
\end{ldescription}
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{survfit}{survfit}}
\end{SeeAlso}

