Description Usage Arguments Value Author(s) References See Also Examples
View source: R/loggammacenslmrob.R
Three different type of robust procedures are provided for the estimation of the parameters in an Accelerated Failure Time model with extended Log Gamma errors in presence of censored observations. Maximum Likelihood is also provided.
1 2 3 4 5 |
formula |
a symbolic description of the model to be fit. See
|
delta |
numeric, 0 or 1. 0 indicated censored observations. |
data |
an optional data frame, list or environment (or object
coercible by |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
weights |
an optional vector of weights to be used in the fitting process (in addition to the robustness weights computed in the fitting process). |
na.action |
a function which indicates what should happen when
the data contain |
method |
string specifying the estimator-chain. Default is TML one step. |
model, x, y |
logicals. If |
singular.ok |
logical. If |
contrasts |
an optional list. See the |
offset |
this can be used to specify an a priori known
component to be included in the linear predictor during fitting.
An |
control |
a |
init |
an optional argument to specify or supply the initial estimate. See Details. |
... |
additional arguments can be used to specify control
parameters directly instead of (but not in addition to!) via
|
An object of class lmrob
; a list including the following
components:
coefficients |
The estimate of the coefficient vector for the
regression part. First element is the intercept and it would be
equals to the parameter |
mu |
The estimate of the intercept parameter. |
sigma |
The estimate of the scale parameter. |
lambda |
The estimate of the shape parameter. |
fitted.values |
Fitted values associated with the estimator. |
residuals |
Residuals associated with the estimator. |
cut.lower, cut.upper |
Cut points for the method based on TML (missing for the other methods). |
iter |
number of iterations. |
weights |
the specified weights (missing if none were used). |
errors |
errors messages. |
n.ret |
number of non zero robust weights for the method based on TML. |
control |
|
converged |
|
method |
method used during the fit. |
rank |
the numeric rank of the fitted linear model. |
rweights |
the “robustness weights”. |
df.residual |
the residual degrees of freedom. |
degree.freedom |
the same as df.residual |
delta |
as in input. |
df |
a vector with 3 components: (number of linearly independent regressors, df.residual, number of regressors). |
xlevels |
(only where relevant) a record of the levels of the factors used in fitting. |
call |
the matched call. |
terms |
the |
model |
if requested (the default), the model frame used. |
x |
if requested, the model matrix used. |
y |
if requested, the response used. |
scale |
square root of the |
na.action |
(where relevant) information returned by
|
offset |
the offset used (missing if none were used). |
contrasts |
(only where relevant) the contrasts used. |
In addition, non-null fits will have qr
relating to the linear
fit, for use by extractor functions such as summary
.
C. Agostinelli, A. Marazzi and V.J. Yohai
C. Agostinelli, I. Locatelli, A. Marazzi and V.J. Yohai (2015) Robust estimators of accelerated failure time regression with generalized log-gamma errors. Submitted.
loggammacensrob
for the case of censored observations
without covariates.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
n <- 50
p <- 2
set.seed(1234)
X <- matrix(rnorm(p*n, sd=2), ncol=p)
mu <- 2
beta <- rep(2,p)
sigma <- 2
lambda <- 1
linear <- mu + X
y <- rloggamma(n=n, mu=linear, sigma=sigma, lambda=lambda)
cens <- rloggamma(n=n, mu=linear+3, sigma=sigma, lambda=lambda)
delta <- as.numeric(y <= cens)
y[delta==0] <- cens[delta==0]
x <- data.frame(y=as.vector(y), x1=X[,1], x2=X[,2])
res <- loggammacenslmrob(y~x1+x2, delta=delta, data=x)
summary(res)
## End(Not run)
|
Call:
loggammacenslmrob(formula = y ~ x1 + x2, delta = delta, data = x)
\--> method = "oneTML"
Residuals:
Min 1Q Median 3Q Max
-10.4920 -3.9314 -1.7702 0.1927 2.7951
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 2.5424 0.8958 2.838 0.00454 **
x1 0.6750 0.1366 4.942 7.74e-07 ***
x2 0.9997 0.1458 6.856 7.09e-12 ***
Sigma 2.1807 0.4055
Lambda 1.5111 1.5087 1.002 0.31654
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Robust residual standard error: 1.477
Robustness weights:
2 observations c(50,64) are outliers with |weight| = 0 ( < 0.001);
98 weights are ~= 1.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.