censorReg is an alternative function for fitting this type
of model.
survreg function is deprecated; please use
instead.
survreg(formula=formula(data), data=sys.parent(), subset,
na.action, link="log", dist="extreme", init=NULL,
fixed=list(), control, model=F, x=F, y=T, ...)
Surv function.
See the documentation for
Surv,
lm and
formula for details.
formula, or the
subset argument.
subset argument has been used. Default is
options()$na.action.
"log" and
"identity".
"extreme",
"logistic",
"gaussian",
"exponential",
and
"rayleigh".
maxiter,
rel.tolerance and
failure)
returned by
survreg.control.
See
survreg.control and the EXAMPLES section for details.
TRUE then the model frame is included as component
model in the object returned by the function.
TRUE then the model matrix is returned as component
x in the object returned by the function.
TRUE then the response is returned as component
y
in the object returned by the function.
lm, including
singular.ok.
survreg is returned, which inherits from class
glm.
See
survreg.object for details.
This routine is not as robust against nearly singular X matrices as
lm
; the problem occurs when the covariance matrix is explicitly inverted
using the
solve function. This can sometimes be solved by subtracting
the mean from all continuous covariates.
# Fit an exponential model
survreg(Surv(futime, fustat) ~ ecog.ps + rx, data=ovarian,
dist='extreme', link='log', fixed=list(scale=1))
# Using survreg.control to supply the control argument
survreg(Surv(days, event) ~ voltage, data=capacitor,
control=survreg.control(maxiter = 40))