PRM: Robust PLS

Description Usage Arguments Details Value Author(s) References Examples

View source: R/PRM.R

Description

Robust PLS by partial robust M-regression.

Usage

1
PRM(formula,data,a,wfunX,wfunY,center.type,scale.type,usesvd,numit,prec)

Arguments

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

Details

M regression is used to robustify PLS. Employment of seperate weight functions for leverage points and residuals.

Value

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

Author(s)

Peter Filzmoser <peter.filzmoser@tuwien.ac.at>

References

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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

Example output

[1]  1.0310097  0.8927724  1.0044301 -1.1344546 -0.6339380 -1.4058849

rpls documentation built on July 8, 2020, 6:46 p.m.

Related to PRM in rpls...