\HeaderA{predict.coxph}{Predictions for Cox model}{predict.coxph}
\methaliasA{predict.coxph.penal}{predict.coxph}{predict.coxph.penal}
\keyword{survival}{predict.coxph}
\begin{Description}\relax
Compute fitted values and regression terms for a model fitted by \code{\LinkA{coxph}{coxph}}
\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'coxph':
predict(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{\LinkA{predict}{predict}},\code{\LinkA{coxph}{coxph}},\code{\LinkA{termplot}{termplot}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
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}


