Learn R Programming

robustloggamma (version 1.0-2.1)

loggammacensrob: Robust estimation of the three parameters extended Log Gamma model in presence of censored observations.

Description

Five different type of robust procedures are provided for the estimation of the parameters in the three parameters extended Log Gamma model in presence of censored observations.

Usage

loggammacensrob(x, delta, start=NULL, weights=rep(1, length(x)),
   method=c("oneTML", "oneWL", "TWQTau", "TQTau", "ML"), control, ...)

Arguments

x

numeric. A vector with the dataset.

delta

numeric, 0 or 1. 0 indicated censored observations.

start

NULL or numeric. A vector of length 3 to be used when method is WL, oneWL and ML, otherwise starting values are obtained from WQTau in the first two methods and QTau in the last one.

weights

numeric. A vector of weights used in the method TQTau.

method

character. The method used, see Details below. Default is oneTML a one step Trunceted Maximum Likelihood estimates starting from TQTau.

control

list. An object from function loggammarob.control.

further arguments can be passed directly to the function instead of using the control argument.

Value

An object of class 'loggammacensrob'. A list that includes the following components:

mu

location parameter.

sigma

scale parameter.

lambda

shape parameter.

eta

estimate of E(exp(x)) parameter.

weights

the final weights.

iterations

number of iterations.

error

if not NULL or 0, an error occured.

data

the original dataset.

delta

the original dataset.

method

the method used.

References

C. Agostinelli, I. Locatelli, A. Marazzi and V.J. Yohai (2015) Robust estimators of accelerated failure time regression with generalized log-gamma errors. Submitted.

See Also

LogGammaDist and loggammarob for the case without censored observations.

Examples

Run this code
# NOT RUN {
  set.seed(1234)
  x <- sort(rloggamma(n=80, lambda=1))
  cens <- rloggamma(n=80, mu=1.5, lambda=1)
  delta <- as.numeric(x <= cens)
  x[delta==0] <- cens[delta==0]  
  res <- loggammacensrob(x, delta, method="oneTML",
    control=loggammarob.control(lower=0, upper=2, n=30))
  print(res)
  summary(res)
# }

Run the code above in your browser using DataLab