Title: | Robust Partial Least Squares |
---|---|
Description: | A robust Partial Least-Squares (PLS) method is implemented that is robust to outliers in the residuals as well as to leverage points. A specific weighting scheme is applied which avoids iterations, and leads to a highly efficient robust PLS estimator. |
Authors: | Peter Filzmoser, Sukru Acitas, Birdal Senoglu and Maximilian Plattner |
Maintainer: | Peter Filzmoser <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.6.0 |
Built: | 2025-02-22 02:53:43 UTC |
Source: | https://github.com/cran/rpls |
Robust Adaptive Modified Maximum Likelihood (RAMML) estimators can be used in the context of PLS to obtain scores and loadings in the latent regression model. The corresponding method is called Partial RAMML (PRAMML).
pramml(X, y, a, reg = "lts", pmml, opt = "l1m", usesvd = FALSE)
pramml(X, y, a, reg = "lts", pmml, opt = "l1m", usesvd = FALSE)
X |
predictor matrix |
y |
response variable |
a |
number of PLS components |
reg |
regression procedure to be used to compute initial estimate of parameter for the linearization of the intractable term; choices are LTS regression ("lts") and S regression ("s") |
pmml |
shape parameter of long-tailed symmetric distribution (considered as robustness tuning constant) |
opt |
if "l1m" the mean centering is done by the l1-median; otherwise if "median" the coordinate-wise median is taken |
usesvd |
if TRUE singular value decomposition is performed; logical, default is FALSE |
coef |
vector with regression coefficients |
intercept |
coefficient for intercept |
wy |
vector of length(y) with residual weights |
wt |
vector of length(y) with weights for leverage |
w |
overall weights |
scores |
matrix with PLS X-scores |
loadings |
matrix with PLS X-loadings |
fitted.values |
vector with fitted y-values |
loadings |
column means of X |
fitted.values |
mean of y |
Sukru Acitas <[email protected]>
S. Acitas, Robust Statistical Estimation Methods for High-Dimensional Data with Applications, tech. rep., TUBITAK 2219, International Post Doctoral Research Fellowship Programme, 2019.
U <- c(rep(2,20), rep(5,30)) X <- replicate(6, U+rnorm(50)) beta <- c(rep(1, 3), rep(-1,3)) e <- c(rnorm(45,0,1.5),rnorm(5,-20,1)) y <- X%*%beta + e res <- pramml(X, y, 4,"s", 16.5, opt ="l1m")
U <- c(rep(2,20), rep(5,30)) X <- replicate(6, U+rnorm(50)) beta <- c(rep(1, 3), rep(-1,3)) e <- c(rnorm(45,0,1.5),rnorm(5,-20,1)) y <- X%*%beta + e res <- pramml(X, y, 4,"s", 16.5, opt ="l1m")
Robust PLS by partial robust M-regression.
PRM(formula,data,a,wfunX,wfunY,center.type,scale.type,usesvd,numit,prec)
PRM(formula,data,a,wfunX,wfunY,center.type,scale.type,usesvd,numit,prec)
formula |
an object of class formula |
data |
a data frame which contains the variables given in formula |
a |
number of PLS components |
wfunX |
weight function to downweight leverage points; predefined weight funcktions "Fair", "Huber", "Tukey" and "Hampel" with respective tuning constants are passed via a list object, e.g. list("Fair",0.95) |
wfunY |
weight function to downweight residuals; predefined weight funcktions "Fair", "Huber", "Tukey" and "Hampel" with respective tuning constants are passed via a list object, e.g. list("Fair",0.95) |
center.type |
type of centering of the data in form of a string that matches an R function, e.g. "median" |
scale.type |
type of scaling for the data in form of a string that matches an R function, e.g. "qn" or alternatively "no" for no scaling |
numit |
the number of maximal iterations for the convergence of the coefficient estimates |
prec |
a value for the precision of estimation of the coefficients |
usesvd |
if TRUE singular value decomposition is performed; logical, default is FALSE |
M regression is used to robustify PLS. Employment of seperate weight functions for leverage points and residuals.
coef |
vector with regression coefficients |
intercept |
coefficient for intercept |
wy |
vector of length(y) with residual weights |
wt |
vector of length(y) with weights for leverage |
w |
overall weights |
scores |
matrix with PLS X-scores |
loadings |
matrix with PLS X-loadings |
fitted.values |
vector with fitted y-values |
Peter Filzmoser <[email protected]>
S. Serneels, C. Croux, P. Filzmoser, and P.J. Van Espen. Partial robust M-regression. Chemometrics and Intelligent Laboratory System, Vol. 79(1-2), pp. 55-64, 2005.
U <- c(rep(2,20), rep(5,30)) X <- replicate(6, U+rnorm(50)) beta <- c(rep(1, 3), rep(-1,3)) e <- c(rnorm(45,0,1.5),rnorm(5,-20,1)) y <- X%*%beta + e d <- as.data.frame(X) d$y <- y res <- PRM(y~., data=d, 3, wfunX=list("Fair",0.95), wfunY=list("Fair",0.95), center.type = "median", scale.type = "no",usesvd = FALSE, numit = 100, prec = 0.01) res$coef
U <- c(rep(2,20), rep(5,30)) X <- replicate(6, U+rnorm(50)) beta <- c(rep(1, 3), rep(-1,3)) e <- c(rnorm(45,0,1.5),rnorm(5,-20,1)) y <- X%*%beta + e d <- as.data.frame(X) d$y <- y res <- PRM(y~., data=d, 3, wfunX=list("Fair",0.95), wfunY=list("Fair",0.95), center.type = "median", scale.type = "no",usesvd = FALSE, numit = 100, prec = 0.01) res$coef
Modified Maximum Likelihood (MML) estimators are asymptotically equivalent to the ML estimators but their methodology works under the assumption of a known shape parameter. Robust Adaptive MML estimators weaken this assumption and are robust to vertical outliers as well as leverage points.
ramml(X,y,p,e)
ramml(X,y,p,e)
X |
predictor matrix |
y |
response variable |
p |
shape parameter of long-tailed symmetric distribution (considered as robustness tuning constant) |
e |
parameter for the linearization of the intractable term |
coef |
vector of coefficients |
scale |
estimate of sigma |
fitted.values |
vector with fitted y-values |
residuals |
vector with y-residuals |
Sukru Acitas <[email protected]>
S. Acitas, Robust Statistical Estimation Methods for High-Dimensional Data with Applications, tech. rep., TUBITAK 2219, International Post Doctoral Research Fellowship Programme, 2019.