censorReg(formula=formula(data), data=sys.parent(), weights=rep(1,n), truncation, subset, na.action, distribution="weibull", threshold=0, initial, fixed=list(), control=NULL, model=F, x=F, y=F, ...)
"censor"
as computed by the
censor
function.
See the documentation for
censor
,
lm
, and
formula
for details.
Two special variable types are handled on the right-hand-side.
These are:
strata()
- indicates that the sample
is to be split into sub-samples,
and as separate model fit in each subsample.
See
strata
for additional details.
offset()
- the offset for each observation
is subtracted from the
(transformed if one of the logged distribution is used) response
and truncation times prior to fitting the model.
formula
,
subset
and
weights
argument.
censor
object that is used
to indicate a truncation distribution.
The usual arguments to
censor
are used in creating the truncation object,
but notice that right truncation means that the failure
(or censoring) must occur between zero and the truncation point,
left truncation means that the failure (or censoring)
must occur between the truncation point and infinity,
and interval truncation means that the failure (or censoring)
must occur within the truncation interval.
In particular, this implies that an observation that is right censored
cannot also come from a right- or interval-truncation distribution,
and similarly for other combinations of censoring and truncation types.
T
is input,
threshold
is computed
as the smallest failure time minus 10% of its absolute value.
An alternate estimate of
threshold
is obtained by
specifying
threshold="Linearized-qq"
which computes an optimization to minimize the curvature
of a quantile-quantile plot of the quantiles of the response
versus the quantiles obtained from a Kaplan-Meier estimate of survival.
maxiter
- the maximum number of iterations.
This defaults to 500.
rel.tolerance
- the convergence criterion.
When the scaled change in the all parameter estimates is less than
rel.tolerance
, convergence is assumed.
This defaults to 0.0001.
escale
- a vector of scale factors,
one for each parameter.
By default, these all equal 10000.
If a scalar is input, it is applied to all elements.
TRUE
then the model frame
is included as component model in the object returned by the function.
TRUE
then the model matrix
is included as component
x
in the object returned by the function.
TRUE
then the response
is included as component
y
in the object returned by the function.
"censorReg"
is returned.
See
censorReg.object
for details.
If there are stratification variables,
than a list of objects of class
"censorReg"
is produced.
This is a class
"censorRegList"
object.
A Fletcher-Powell algorithm is used in model fitting. The basic estimation code comes from W. Q. Meeker and is described in Meeker and Duke (1981) which details a program named CENSOR. Recently, W. Q. Meeker has refined the estimation algorithms, making them more general and stable.
Meeker, W. Q. and Duke, S. D. (1981). CENSOR - A User-Oriented Computer Program for Life Data Analysis. The American Statistician, 35, 112.
# Fit an exponential model censorReg(censor(futime,fustat) ~ ecog.ps + rx, data=ovarian, distribution="exponential", fixed=list(scale=1)) censorReg(censor(days, event)~voltage, data=capacitor2, weights=weights, fixed=list(voltage=-0.30))