Function to compute the DetLTS estimates of regression.
DetLTS(x, y, intercept = 1, alpha = 0.75, h = NULL, scale_est = "scaleTau2")
Matrix of design variables. Never contains an intercept.
Vector of responses.
A boolean indicating whether the regression contains an intercept.
numeric parameter controlling the size of the subsets over which the determinant is minimized, i.e., alpha*n observations are used for computing the determinant. Allowed values are between 0.5 and 1 and the default is 0.75. Can be a vector.
Integer in [ceiling((n+p+1)/2)
,n) which determines the number of observations which
are awarded weight in the fitting process. Can be a vector. If both h
and alpha
are set to non default values,
alpha
will be ignored.
A character string specifying the variance functional. Possible values are "Qn" or "scaleTau2".
The function DetLTS
returns a list with as many components as
there are elements in the h
. Each of the entries is a list
containing the following components:
the value of the objective function of the LTS regression method, i.e., the sum of the \(h\) smallest squared raw residuals.
vector of coefficient estimates (including the intercept by default when
intercept=TRUE
), obtained after reweighting.
the best subset found and used for computing the raw estimates, with
length(best) == quan = h.alpha.n(alpha,n,p)
.
vector like y
containing the fitted values
of the response after reweighting.
vector like y
containing the residuals from
the weighted least squares regression.
scale estimate of the reweighted residuals.
same as the input parameter alpha
.
the number \(h\) of observations which have determined the least trimmed squares estimator.
same as the input parameter intercept
.
a vector of length two containing the consistency correction factor and the finite sample correction factor of the final estimate of the error scale.
vector of raw coefficient estimates (including
the intercept, when intercept=TRUE
).
scale estimate of the raw residuals.
vector like y
containing the raw residuals
from the regression.
a vector of length two containing the consistency correction factor and the finite sample correction factor of the raw estimate of the error scale.
vector like y containing weights that can be used in a weighted least squares. These weights are 1 for points with reasonably small residuals, and 0 for points with large residuals.
vector containing the raw weights based on the raw residuals and raw scale.
character string naming the method (Least Trimmed Squares).
Vakili K. (2016). A study and implementation of robust estimators for multivariate and functional data (Doctoral dissertation).
Maronna, R.A. and Zamar, R.H. (2002) Robust estimates of location and dispersion of high-dimensional datasets; Technometrics 44(4), 307--317.
Rousseeuw, P.J. and Croux, C. (1993) Alternatives to the Median Absolute Deviation; Journal of the American Statistical Association , 88(424), 1273--1283.
Peter J. Rousseeuw (1984), Least Median of Squares Regression. Journal of the American Statistical Association 79, 871--881.
P. J. Rousseeuw and A. M. Leroy (1987) Robust Regression and Outlier Detection. Wiley.
P. J. Rousseeuw and K. van Driessen (1999) A fast algorithm for the minimum covariance determinant estimator. Technometrics 41, 212--223.
Pison, G., Van Aelst, S., and Willems, G. (2002) Small Sample Corrections for LTS and MCD. Metrika 55, 111-123.
# NOT RUN {
n<-100
h<-c(55,76,89)
set.seed(123)# for reproducibility
x0<-matrix(rnorm(n*2),nc=2)
y0<-rnorm(n)
out1<-DetLTS(x0,y0,h=h)
# }
Run the code above in your browser using DataLab