TML.censored {RobustAFT}R Documentation

Truncated Maximum Likelihood Regression With Censored Observations

Description

This function computes the truncated maximum likelihood estimates of accelerated failure time regression described in Locatelli et al. (2010). The error distribution is assumed to follow approximately a Gaussian or a log-Weibull distribution. The cut-off values for outlier rejection are fixed or adaptive.

Usage

TML.censored(formula, delta, data, errors = "Gaussian",  initial = "S", 
             input = NULL, otp = "fixed", cov=TRUE, cu = NULL, control.S=list(), 
             control.ref=list(), control.tml=list())

Arguments

formula

A formula, i.e., a symbolic description of the model to be adjusted (cf. glm or lm).

data

An optional data frame containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which robaft is called.

delta

Vector of 0 and 1.

  • 0: censored observation.

  • 1: complete observation.

errors
  • "Gaussian": the error distribution is assumed to be Gaussian.

  • "logWeibull" : the error distribution is assumed to be log-Weibull.

initial
  • "S": initial S-estimate.

  • "input": the initial estimate is given on input.

input

A list(theta=c(...),sigma=...): initial input estimates where theta is a vector of p coefficients and sigma a scalar scale.
Required when initial="input".

otp
  • "adaptive": adaptive cut-off.

  • "fixed": non adaptive cut-off.

cov

If TRUE the covariance matrix is computed.

cu

Preliminary minimal upper cut-off. The default is 2.5 in the Gaussian case and 1.855356 in the log-Weibull case.

control.S

A list of control parameters for the computation of the initial S estimates. See the function TML.censored.control.S for the default values.

control.ref

A list of control parameters for the refinement algorithm of the initial S estimates. See the function TML.censored.control.ref for the default values.

control.tml

AA list of control parameters for the computation of the final estimates. See the function TML.censored.control.tml for the default values.

Value

TML.censored returns an object of class "TML". The function summary can be used to obtain or print a summary of the results. The generic extractor functions fitted, residuals and weights can be used to extract various elements of the object returned by TML.censored. The function update can be used to update the model.

An object of class "TML" is a list with at least the following components:

th0

Initial coefficient estimates.

v0

Initial scale estimate.

nit.ref

Reached number of iteration in the refinement step for the initial estimates.

th1

Final coefficient estimates.

v1

Final scale estimate.

nit.tml

Number of iterations reached in IRLS algorithm for the final estimates.

tu, tl

Final cut-off values.

alpha

Estimated proportion of retained observations.

tn

Number of retained observations.

weights

Vector of weights (0 for rejected observations, 1 for retained observations).

COV

Covariance matrix of the final estimates (th1[1],...,th1[p],v1) (where p=ncol(X)).

residuals

Residuals of noncensored observations are calculated as response minus fitted values. For censored observations, the the expected residuals given that the response is larger than the recorded censored value are provided.

fitted.values

The fitted mean values.

call

The matched call.

formula

The formula supplied.

terms

The terms object used.

data

The data argument.

References

Locatelli I., Marazzi A., Yohai V. (2010). Robust accelerated failure time regression. Computational Statistics and Data Analysis, 55, 874-887.

See Also

TML.censored.control.ref, TML.censored.control.tml, TML.censored.control.S, TML.noncensored

Examples

     # This is the example described in Locatelli et al. (2010). 
     # The estimates are slighty different than those of the paper due to changes 
     # in the algorithm for the final estimate.
     #
## Not run: 
     data(MCI)
     attach(MCI)
     
     # Exploratory Analysis
     plot(Age,log(LOS),type= "n",cex=0.7)

     # (1) filled square : regular,   complete
     # (2) empty  square : regular,   censored
     # (3) filled triangle : emergency, complete
     # (4) empty  triangle : emergency, censored

     points(Age[Dest==1 & TypAdm==0], log(LOS)[Dest==1 & TypAdm==0], pch=15,cex=0.7) # (1)
     points(Age[Dest==0 & TypAdm==0], log(LOS)[Dest==0 & TypAdm==0], pch=0, cex=0.7) # (2) 
     points(Age[Dest==1 & TypAdm==1], log(LOS)[Dest==1 & TypAdm==1], pch=17,cex=0.7) # (3) 
     points(Age[Dest==0 & TypAdm==1], log(LOS)[Dest==0 & TypAdm==1], pch=2, cex=0.7) # (4) 

     # Maximum Likelihood
     ML   <- survreg(Surv(log(LOS), Dest) ~ TypAdm*Age, dist="gaussian")
     summary(ML)
     B.ML <- ML$coef
     S.ML <- ML$scale
     
     abline(c(B.ML[1]        ,B.ML[3]        ),lwd=1,col="grey",lty=1)
     abline(c(B.ML[1]+B.ML[2],B.ML[3]+B.ML[4]),lwd=1,col="grey",lty=1)
     
     # Robust Accelerated Failure Time Regression with Gaussian errors
     ctrol.S   <- list(N=150, q=5, sigma0=1, MAXIT=100, TOL=0.001,seed=123)

     ctrol.ref <- list(maxit.sigma=2,tol.sigma=0.0001,maxit.Beta=2,tol.Beta=0.0001,
           Maxit.S=50, tol.S.sigma=0.001, tol.S.Beta=0.001,alg.sigma=1,nitmon=FALSE)

     ctrol.tml <- list(maxit.sigma=50,tol.sigma=0.0001,maxit.Beta=50,tol.Beta=0.0001,
      Maxit.TML=50, tol.TML.sigma=0.001, tol.TML.Beta=0.001, alg.sigma=1,nitmon=FALSE)
     
     WML<-TML.censored(log(LOS)~TypAdm*Age,data=MCI,delta=Dest,otp="adaptive",
          control.S=ctrol.S,control.ref=ctrol.ref,control.tml=ctrol.tml)

     summary(WML)
     
     B.WML<-coef(WML)
     abline(c(B.WML[1]         ,B.WML[3]         ),lty=1, col="red")
     abline(c(B.WML[1]+B.WML[2],B.WML[3]+B.WML[4]),lty=1, col="red")

## End(Not run)

[Package RobustAFT version 1.4-7 Index]