fit.lspls.glm: Fitting LS-PLS for generalized model for logistic regression

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Fits a Least Square-Partial Least Square for logistic regression model. There are 3 extensions.

Usage

1
2
3
fit.lspls.glm(Y, X, D, W=diag(rep(1,nrow(D))), ncomp, method=c("LS-PLS-IRLS", 
"R-LS-PLS", "IR-LS-PLS"),lambda=NULL, penalized = NULL, nbrIterMax = NULL, 
threshold= NULL)

Arguments

Y

a vector of length n giving the classes of the n observations. The classes must be coded as 1 or 0.

X

a data matrix (nxp) of genes. NAs and Inf are not allowed. Each row corresponds to an observation and each column to a gene.

D

a data matrix (nxq) of clinical data. NAs and Inf are not allowed. Each row corresponds to an observation and each column to a clinical variable.

W

weight matrix. If W is the identity matrix then the function will fit a standard LS-PLS model.

ncomp

a positive integer. ncomp is the number of selected components.

method

one of the 3 extensions of LS-PLS for logistic regression models.

penalized

if TRUE the parameter associated with D is ridge penalized. To use only if method equals to "R-LS-PLS".

lambda

coefficient of ridge penalty. If penalized = TRUE, lambda is the penalty for D. To use only if method equals to "R-LS-PLS".

nbrIterMax

maximal number of iterations. To use only if method equals to "R-LS-PLS" or "IR-LS-PLS".

threshold

used for the stopping rule. To use only if method equals to "R-LS-PLS" or "IR-LS-PLS".

Details

This function fits LS-PLS models. With the argument "method" the user can choose one of the three extensions of LS-PLS for logistic regression (LS-PLS-IRLS, R-LS-PLS, IR-LS-PLS). For more details see references.

Value

coefficients

vector of length q+p associate to cbind(D,X).

cvg

the 0-1 value indicating convergence of the algorithm (1 for convergence, 0 otherwise).

orthCoef

coefficients matrix (pxq) returned also in the function lspls to be used to compute new predictors.

projection

the projection matrix used to convert X to scores.

intercept

the constant of the model.

Author(s)

Caroline Bazzoli, Thomas Bouleau, Sophie Lambert-Lacroix

References

Caroline Bazzoli, Sophie Lambert-Lacroix. Classification using LS-PLS with logistic regression based on both clinical and gene expression variables. 2017. <hal-01405101>

See Also

cv.lspls.glm,predict.lspls.glm.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#Data
data(BreastCancer)
#vector of responses
Y<-BreastCancer$Y
#Genetic data
X<-BreastCancer$X
#Clinical data
D<-BreastCancer$D
#SIS selection
X<-scale(X)

X<-SIS.selection(X=X,Y=Y,pred=50)
#Cross validation, 90% of our datasets is used to compose learning samples

#method LS-PLS-IRLS
ncompopt.lsplsirls<-cv.lspls.glm(Y=Y,X=X,D=D,folds=5,ncompmax=5,proportion=0.9,
		                                 method="LS-PLS-IRLS")$ncompopt
#method R-LS-PLS
cv<-cv.lspls.glm(Y=Y,X=X,D=D,ncompmax=5,proportion=0.9,method="R-LS-PLS",
	           lambda.grid=exp(log(10^seq(-3,2,0.7))),penalized=TRUE,
	           nbrIterMax=15,threshold=10^(-12))
ncompopt.rlspls<-cv$ncompopt
lambdaopt.rlspls<-cv$lambdaopt
#method IR-LS-PLS
ncompopt.irlspls<-cv.lspls.glm(Y=Y,X=X,D=D,ncompmax=5,proportion=0.9,
	method="IR-LS-PLS",nbrIterMax=15,threshold=10^(-12))$ncompopt         

#fitting model
fit.lsplsirls<-fit.lspls.glm(Y=Y,X=X,D=D,ncomp=ncompopt.lsplsirls,method="LS-PLS-IRLS")
fit.rlspls<-fit.lspls.glm(Y=Y,X=X,D=D,ncomp=ncompopt.rlspls,method="R-LS-PLS",
		         lambda=lambdaopt.rlspls,penalized=TRUE,nbrIterMax=15,
                         threshold=10^(-12))
fit.irlspls<-fit.lspls.glm(Y=Y,X=X,D=D,ncomp=ncompopt.irlspls,method="IR-LS-PLS",
                                                nbrIterMax=15,threshold=10^(-12))

lsplsGlm documentation built on May 2, 2019, 12:36 p.m.