\Header{predict.coxph}{Predictions for Cox model}
\methalias{predict.coxph.penal}{predict.coxph}
\keyword{survival}{predict.coxph}
\begin{Description}\relax
Compute fitted values and regression terms for a model fitted by \code{\Link{coxph}}
\end{Description}
\begin{Usage}
\begin{verbatim}
predict.coxph(object, newdata, type=c("lp", "risk", "expected", "terms"), se.fit=FALSE, terms=names(object$assign), collapse, safe=FALSE,...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] A \code{coxph} object
\item[\code{newdata}] Optional new data to predict at
\item[\code{type}] Type of prediction wanted
\item[\code{se.fit}] Return standard errors as well?
\item[\code{terms}] If \code{type="terms"}, which terms to return.
\item[\code{collapse}] identifier for which rows correspond to different individuals
\item[\code{safe}] Use a more intensive `safe' prediction method
\item[\code{...}] other unused arguments
\end{ldescription}
\end{Arguments}
\begin{Value}
A vector or matrix of fitted values. If \code{se.fit=TRUE} a list
whose first component is the fitted values and second is the standard errors.
\end{Value}
\begin{SeeAlso}\relax
\code{\Link{predict}},\code{\Link{coxph}},\code{\Link{termplot}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(aml)
fit<-coxph(Surv(time,status)~x,data=aml)
predict(fit,type="lp")
predict(fit,type="risk")
predict(fit,type="expected")
predict(fit,type="terms")
predict(fit,type="lp",se.fit=TRUE)
predict(fit,type="risk",se.fit=TRUE)
predict(fit,type="expected",se.fit=TRUE)
predict(fit,type="terms",se.fit=TRUE)
\end{ExampleCode}
\end{Examples}

