spls | R Documentation |
This function provides penalty-based sparse partial least squares analysis for single dataset with high dimensions., which aims to have the direction of the first loading.
spls(x, y, mu1, eps = 1e-04, kappa = 0.05, scale.x = TRUE, scale.y = TRUE, maxstep = 50, trace = FALSE)
x |
matrix of explanatory variables. |
y |
matrix of dependent variables. |
mu1 |
numeric, sparsity penalty parameter. |
eps |
numeric, the threshold at which the algorithm terminates. |
kappa |
numeric, 0 < kappa < 0.5 and the parameter reduces the effect of the concave part of objective function. |
scale.x |
character, "TRUE" or "FALSE", whether or not to scale the variables x. The default is TRUE. |
scale.y |
character, "TRUE" or "FALSE", whether or not to scale the variables y. The default is TRUE. |
maxstep |
numeric, maximum iteration steps. The default value is 50. |
trace |
character, "TRUE" or "FALSE". If TRUE, prints out its screening results of variables. |
An 'spls' object that contains the list of the following items.
x: data matrix of explanatory variables with centered columns. If scale.x is TRUE, the columns of data matrix are standardized to have mean 0 and standard deviation 1.
y: data matrix of dependent variables with centered columns. If scale.y is TRUE, the columns of data matrix are standardized to have mean 0 and standard deviation 1.
betahat: the estimated regression coefficients.
loading: the estimated first direction vector.
variable: the screening results of variables.
meanx: column mean of the original dataset x.
normx: column standard deviation of the original dataset x.
meany: column mean of the original dataset y.
normy: column standard deviation of the original dataset y.
See Also as ispls
, meta.spls
.
library(iSFun) data("simData.pls") x.spls <- do.call(rbind, simData.pls$x) y.spls <- do.call(rbind, simData.pls$y) res_spls <- spls(x = x.spls, y = y.spls, mu1 = 0.05, eps = 1e-3, kappa = 0.05, scale.x = TRUE, scale.y = TRUE, maxstep = 50, trace = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.