TML.noncensored {RobustAFT}R Documentation

Truncated Maximum Likelihood Regression Without Censored Observations

Description

This function computes the truncated maximum likelihood regression estimate described in Marazzi and Yohai (2004). 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.noncensored(formula, data, errors = "Gaussian", cu = NULL, 
                initial = "S",otp = "fixed", cov = "parametric", 
                input = NULL, control = list(), ...)

Arguments

formula

A formula, i.e., a symbolic description of the model to be fit (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 TML.noncensored is called.

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

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

cu

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

initial
  • "S" : initial S-estimate.

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

otp
  • "adaptive": adaptive cut-off.

  • "fixed" : non adaptive cut-off.

cov
  • "no": no estimate of the covariance matrix of the coefficients is provided on output.

  • "parametric": a parametric estimate of the covariance matrix of the coefficients is provided (to be used when n is small).

  • "nonparametric": a nonparametric estimate of the covariance matrix of the coefficients is provided.

input

Initial input estimates of location and scale.
Required when initial="input".

  • "Gaussian case" : list(theta=...,sigma=...) initial input estimates. theta: location; sigma: scale.

  • "logWeibull case" : list(tau=...,v=...) initial input estimates of location (tau) and scale (v).

control

Control parameters. For the default values, see the function TML.noncensored.control.

...

If fastS=TRUE, parameters for lmrob.S. See the function lmrob.control (from the robustbase package) for the default values.

Value

TML.noncensored 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 value returned by TML.noncensored. The function update can be used to update the model.

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

th0

Initial coefficient estimates (S or input).

v0

Initial scale (S or input).

nit0

Reached number of iteration in lmrob.S (available only if fastS is TRUE).

th1

Final coefficient estimates.

v1

Final scale (S or input).

nit1

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

tu, tl

Final cut-off values.

alpha

Estimated proportion of retained observations.

tn

Number of retained observations.

beta

Consistency constant for scale.

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

The residuals, that is response minus fitted values.

fitted.values

The fitted mean values.

call

The matched call.

formula

The formula supplied.

terms

The terms object used.

data

The data argument.

References

Marazzi A., Yohai V. (2004). Adaptively truncated maximum likelihood regression with asymmetric errors. Journal of Statistical Planning and Inference, 122, 271-291.

See Also

TML.noncensored.control, TML1.noncensored, TML1.noncensored.control, TML.censored

Examples


## Not run: 
     data(D243)
     Cost <- D243$Cost                             # Cost (Swiss francs)
     LOS  <- D243$LOS                              # Length of stay (days)
     Adm  <- D243$Typadm; Adm <- (Adm==" Urg")*1   # Type of admission 
                                                   # (0=on notification, 1=Emergency)
     Ass  <- D243$Typass; Ass <- (Ass=="P"   )*1   # Type of insurance 
                                                   # (0=usual, 1=private)
     Age  <- D243$age                              # Age (years)
     Dst  <- D243$dest;   Dst <- (Dst=="DOMI")*1   # Destination 
                                                   # (1=Home, 0=another hospital)
     Sex  <- D243$Sexe;   Sex <- (Sex=="M"   )*1   # Sex (1=Male, 0=Female)

     # Truncated maximum likelihood regression with Gaussian errors

     z    <- TML.noncensored(log(Cost)~log(LOS)+Adm+Ass+Age+Dst+Sex,
              otp="adaptive",control=list(fastS=TRUE))

     summary(z)
     
     # Truncated maximum likelihood regression with log-Weibull errors

     w    <- TML.noncensored(log(Cost)~log(LOS)+Adm+Ass+Age+Dst+Sex,
             errors="logWeibull",otp="adaptive",control=list(fastS=TRUE))

     summary(w)

## End(Not run)

[Package RobustAFT version 1.4-7 Index]