DetLTS: Robust and Deterministic Linear Regression via DetLTS

Description Usage Arguments Value Author(s) References Examples

View source: R/DetLTS.R

Description

Function to compute the DetLTS estimates of regression.

Usage

1
  DetLTS(x, y, intercept = 1, alpha = 0.75, h = NULL, scale_est = "scaleTau2")

Arguments

x

Matrix of design variables. Never contains an intercept.

y

Vector of responses.

intercept

A boolean indicating whether the regression contains an intercept.

alpha

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.

h

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.

scale_est

A character string specifying the variance functional. Possible values are "Qn" or "scaleTau2".

Value

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:

crit

the value of the objective function of the LTS regression method, i.e., the sum of the h smallest squared raw residuals.

coefficients

vector of coefficient estimates (including the intercept by default when intercept=TRUE), obtained after reweighting.

best

the best subset found and used for computing the raw estimates, with length(best) == quan = h.alpha.n(alpha,n,p).

fitted.values

vector like y containing the fitted values of the response after reweighting.

residuals

vector like y containing the residuals from the weighted least squares regression.

scale

scale estimate of the reweighted residuals.

alpha

same as the input parameter alpha.

quan

the number h of observations which have determined the least trimmed squares estimator.

intercept

same as the input parameter intercept.

cnp2

a vector of length two containing the consistency correction factor and the finite sample correction factor of the final estimate of the error scale.

raw.coefficients

vector of raw coefficient estimates (including the intercept, when intercept=TRUE).

raw.scale

scale estimate of the raw residuals.

raw.resid

vector like y containing the raw residuals from the regression.

raw.cnp2

a vector of length two containing the consistency correction factor and the finite sample correction factor of the raw estimate of the error scale.

lts.wt

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.

raw.weights

vector containing the raw weights based on the raw residuals and raw scale.

method

character string naming the method (Least Trimmed Squares).

Author(s)

Vakili Kaveh using translation of the C code from pcaPP (by Peter Filzmoser, Heinrich Fritz, Klaudius Kalcher, see citation("pcaPP")) for the Qn and scaleTau2 (Original by Kjell Konis with substantial modifications by Martin Maechler) from robustbase (see citation("scaleTau2")) as well as R code from function ltsReg in package robustbase (originally written by Valentin Todorov valentin.todorov@chello.at, based on work written for S-plus by Peter Rousseeuw and Katrien van Driessen from University of Antwerp, see citation("ltsReg")).

References

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.

Examples

1
2
3
4
5
6
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)

DetR documentation built on May 1, 2019, 7:59 p.m.