Learn R Programming

PLSbiplot1 (version 0.1)

SPLS.GLM: Sparse Partial Least Squares-Generalized Linear Model (SPLS-GLM) algorithm

Description

Takes in a set of predictor variables and a set of response variables and gives the SPLS-GLM parameters.

Usage

SPLS.GLM(X, y, A, lambdaY, lambdaX, eps = 0.001, ...)

Arguments

X
A (NxP) predictor matrix
y
A (Nx1) Poisson-distributed response vector
A
The number of PLS components
lambdaY
A value for the penalty parameters for the soft-thresholding penalization function for Y-weights
lambdaX
A value for the penalty parameters for the soft-thresholding penalization function for X-weights
eps
Cut off value for convergence step
...
Other arguments. Currently ignored

Value

The SPLS-GLM parameters of D=[X y]

Examples

Run this code
if(require(robustbase))
possum.mat
y = as.matrix(possum.mat[,1], ncol=1)
dimnames(y) = list(paste("S", 1:nrow(possum.mat), seq=""), "Diversity")
X = as.matrix(possum.mat[,2:14], ncol=13)
dimnames(X) = list(paste("S", 1:nrow(possum.mat), seq=""), colnames(possum.mat[,2:14]))
SPLS.GLM(scale(X), scale(y), A=2, lambdaY=0, lambdaX=3.3, eps=1e-3)
#lambdaX and lambdaY value are determined using function opt.penalty.values
#for more details, see opt.penalty.values help file

Run the code above in your browser using DataLab