This functions computes the truncated maximum likelihood estimates of location and scale
described in Marazzi and Yohai (2004).
It assumes that the error distribution is approximately Gaussian or log-Weibull.
The cut-off values for outlier rejection are fixed or adaptive.
This function is a simplified version of TML.noncensored
for the case without covariates.
TML1.noncensored(y, errors= c("Gaussian", "logWeibull"), cu = NULL,
initial = c("S", "input"), otp = c("adaptive", "fixed"),
cov = c("no", "parametric", "nonparametric"), input = NULL,
control = list(), ...)
A list with the following components:
Initial location estimate (S or input).
Initial scale estimate (S or input).
Reached number of iteration if initial="S"
Final location estimate.
Final scale estimate.
Reached iteration number in IRLS algorithm for final estimate (only for the log_Weibull case).
Final cut-off values.
Estimated proportion of retained observations.
Number of retained observations.
Consistency constant for scale.
Vector of weights (0 for rejected observations, 1 for retained observations).
Covariance matrix of the initial estimates (th0,v0).
Covariance matrix of the final estimates (th1,v1).
Observation vector
"Gaussian": the error distribution is assumed to be approximately Gaussian.
"logWeibull" : the error distribution is assumed to be approximately log-Weibull.
Preliminary minimal upper cut-off. The default is 2.5 in the Gaussian case and 1.855356 in the log-Weibull case.
"S" : initial S-estimate.
"input" : the initial estimate is given on input.
"adaptive": adaptive cut-off.
"fixed" : non adaptive cut-off.
"no": no estimate of the covariance matrix of the estimates is provided on output.
"parametric": a parametric estimate of the covariance matrix of the location-scale estimates is provided (to be used when n is small).
"nonparametric": a nonparametric estimate of the covariance matrix of the location-scale estimates is provided.
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 parameters. For the default values, see the function TML1.noncensored.control.
If initial="S", parameters for the computation of the initial S estimates. See the function TML1.noncensored.control.S
for the default values.
Marazzi A., Yohai V. (2004). Adaptively truncated maximum likelihood regression with asymmetric errors. Journal of Statistical Planning and Inference, 122, 271-291.
TML.noncensored
, TML1.noncensored.control
, TML1.noncensored.control.S
if (FALSE) {
data(Z243)
Cost <- Z243$CouTot
y <- log(Cost)
ctrl <- TML1.noncensored.control(iv=1,tol=1e-3)
z <- TML1.noncensored(y,errors="logWeibull", initial="S",otp="adaptive",
cov="no",control=ctrl)
}
Run the code above in your browser using DataLab