\Header{cox.zph}{Test the Proportional Hazards Assumption of a Cox Regression}
\alias{print.cox.zph}{cox.zph}
\alias{[.cox.zph}{cox.zph}
\keyword{survival}{cox.zph}
\begin{Description}\relax
Test the proportional hazards assumption for a Cox regression model fit
(\code{coxph}).
\end{Description}
\begin{Usage}
\begin{verbatim}
cox.zph(fit, transform="km", global=TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{fit}] the result of fitting a Cox regression model, using the \code{coxph} function.

\item[\code{transform}] a character string specifying how the survival times should be transformed
before the test is performed.
Possible values are \code{"km"}, \code{"rank"}, \code{"identity"} or  a
function of one argument.

\item[\code{global}] should a global chi-square test be done, in addition to the
per-variable tests.

\end{ldescription}
\end{Arguments}
\begin{Value}
an object of class \code{"cox.zph"}, with components:
\end{Value}
\begin{Note}\relax
The \code{plot} method requires the \code{splines} library
\end{Note}
\begin{References}\relax
P. Grambsch and T. Therneau (1994),
Proportional hazards tests and diagnostics based on weighted residuals.
\emph{Biometrika,}
\bold{81}, 515-26.
\end{References}
\begin{SeeAlso}\relax
\code{\Link{coxph}}, \code{\Link{Surv}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(ovarian)
fit <- coxph( Surv(futime, fustat) ~ age + rx, ovarian)
temp<- cox.zph(fit)
print(temp)                  #display the results
plot(temp)                   #plot curves
\end{ExampleCode}
\end{Examples}

