Fit SPLS regression models
Fit a SPLS regression.
spls( x, y, K, eta, kappa=0.5, select="pls2", fit="simpls", scale=TRUE, center=TRUE, scale.y=FALSE, eps=1e-4, maxstep=100)
- Matrix of predictors.
- Vector or matrix of responses.
- Number of hidden components.
- Thresholding parameter.
etashould be between 0 and 1.
- Parameter to control the effect of
the concavity of the objective function
and the closeness of the original and surrogate direction vectors.
kappais relevant only when the responses are multivariate.
- PLS algorithm for variable selection.
"simpls". Default is
- PLS algorithm for model fitting. Alternatives are
"oscorespls". Default is
- Scale the predictors by dividing each predictor variable by its sample standard deviation?
- Center the predictors?
- Scale the responses by dividing each response variable by its sample standard deviation?
- An effective zero. Default is 1e-4.
- Maximum number of iterations when fitting direction vectors. Default is 100.
The SPLS method is described in detail in Chun and Keles (2007).
SPLS directly imposes sparsity on the dimension reduction step of PLS
in order to achieve accurate prediction and variable selection simultaneously.
select refers to the PLS algorithm for variable selection.
fit refers to the PLS algorithm for model fitting
spls utilizes the algorithms offered by the
plsr in the
fit are independent.
splsobject is returned. print, plot, predict, coef, ci.spls, coefplot.spls methods use this object.
Chun, H. and Keles, S. (2007). "Sparse partial least squares
for simultaneous dimension reduction and variable selection",
print, plot, predict, coef, ci.spls, coefplot.spls methods for spls.
data(yeast) # SPLS with eta=0.7 & 8 hidden components f <- spls( yeast$x, yeast$y, K=8, eta=0.7 ) print(f) # Print out coefficients coef.f <- coef(f) coef.f[,1] # Coefficient path plot plot( f, yvar=1 ) x11() # Coefficient plot of the selected variables coefplot.spls( f, xvar=c(1:4) )