\HeaderA{survreg}{Regression for a Parametric Survival Model}{survreg}
\aliasA{anova.survreg}{survreg}{anova.survreg}
\aliasA{anova.survreglist}{survreg}{anova.survreglist}
\aliasA{censorReg}{survreg}{censorReg}
\aliasA{labels.survreg}{survreg}{labels.survreg}
\aliasA{model.frame.survreg}{survreg}{model.frame.survreg}
\aliasA{print.summary.survreg}{survreg}{print.summary.survreg}
\aliasA{print.survreg.penal}{survreg}{print.survreg.penal}
\aliasA{survReg}{survreg}{survReg}
\aliasA{vcov.survreg}{survreg}{vcov.survreg}
\keyword{survival}{survreg}
\begin{Description}\relax
Regression for a parametric survival model. These are all
time-transformed location models, with the most useful case being the
accelerated failure models that use a log transformation.
\end{Description}
\begin{Usage}
\begin{verbatim}
survreg(formula=formula(data), data=parent.frame(), weights, 
subset,na.action,dist="weibull",  init=NULL, scale=0,
 control=survreg.control(),parms=NULL,model=FALSE, x=FALSE,
 y=TRUE, robust=FALSE, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{formula}] a formula expression as for other regression models.
See the documentation for \code{lm} and \code{formula} for details.

\item[\code{data}] optional data frame in which to interpret the variables occurring in the
formula.

\item[\code{weights}] Optional observation weights
\item[\code{subset}] subset of the observations to be used in the fit.

\item[\code{na.action}] function to be used to handle any NAs in the data.

\item[\code{dist}] assumed distribution for y variable. 
If the argument is a character string, then it is assumed to name an
element from \code{\LinkA{survreg.distributions}{survreg.distributions}}. These include
\code{"weibull"}, \code{"exponential"}, \code{"gaussian"}, \code{"logistic"}, \code{"lognormal"} and \code{"loglogistic"}.
Otherwise, it is assumed to be a user defined list conforming to the
format described in \code{\LinkA{survreg.distributions}{survreg.distributions}}.

\item[\code{parms}] a list of fixed parameters.  For the t-distribution for instance this is
the degrees of freedom; most of the distributions have no parameters.

\item[\code{init}] optional vector of initial values for the parameters.

\item[\code{scale}] optional fixed value for the scale.  If set to <=0 then the scale is
estimated.

\item[\code{control}] a list of control values, in the format producted by \code{survreg.control}.

\item[\code{model}] if TRUE, the model frame is returned.

\item[\code{x}] if TRUE, then the X matrix is returned.

\item[\code{y}] if TRUE, then the y vector (or survival times) is returned.

\item[\code{robust}] if TRUE, sandwich standard errors are computed. Defaults to TRUE when
\code{formula} contains a \code{\LinkA{cluster}{cluster}} term.

\item[\code{...}] other arguments which will be passed to \code{survreg.control}.

\end{ldescription}
\end{Arguments}
\begin{Value}
an object of class \code{survreg} is returned.
\end{Value}
\begin{Section}{Compatibility note}
This routine underwent significant changes from survival4 to
survival5. The \LinkA{survreg.old}{survreg.old} function gives a backwards-compatible
interface.  In S-PLUS the new function is called \code{survReg} and
the old one \code{survreg}.
\end{Section}
\begin{SeeAlso}\relax
\code{\LinkA{survreg.object}{survreg.object}}, \code{\LinkA{survreg.distributions}{survreg.distributions}},
\code{\LinkA{pspline}{pspline}}, \code{\LinkA{frailty}{frailty}}, \code{\LinkA{ridge}{ridge}},
\code{\LinkA{survreg.old}{survreg.old}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## These are all the same
survreg(Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist='weibull',scale=1)
survreg(Surv(futime, fustat) ~ ecog.ps + rx, ovarian,
dist="exponential")
survreg.old(Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist='extreme',fixed=list(scale=1),link="log")

\end{ExampleCode}
\end{Examples}


