Description Usage Arguments Details Value Author(s) References See Also Examples
Light version of PLS_glm
for cross validation purposes either on
complete or incomplete datasets.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 
dataY 
response (training) dataset 
dataX 
predictor(s) (training) dataset 
nt 
number of components to be extracted 
dataPredictY 
predictor(s) (testing) dataset 
modele 
name of the PLS glm model to be fitted ( 
family 
a description of the error distribution and link function to
be used in the model. This can be a character string naming a family
function, a family function or the result of a call to a family function.
(See 
scaleX 
scale the predictor(s) : must be set to TRUE for

scaleY 
scale the response : Yes/No. Ignored since non always possible for glm responses. 
keepcoeffs 
whether the coefficients of the linear fit on link scale of unstandardized eXplanatory variables should be returned or not. 
keepstd.coeffs 
whether the coefficients of the linear fit on link scale of standardized eXplanatory variables should be returned or not. 
tol_Xi 
minimal value for Norm2(Xi) and det(pp'*pp) if there is any missing value in the 
weights 
an optional vector of 'prior weights' to be used in the
fitting process. Should be 
method 
logistic, probit, complementary loglog or cauchit (corresponding to a Cauchy latent variable). 
verbose 
should info messages be displayed ? 
This function is called by PLS_glm_kfoldcv_formula
in order to
perform crossvalidation either on complete or incomplete datasets.
There are seven different predefined models with predefined link functions available :
ordinary pls models
glm gaussian with inverse link pls models
glm gaussian with identity link pls models
glm binomial with square inverse link pls models
glm binomial with logit link pls models
glm poisson with log link pls models
glm polr with logit link pls models
Using the "family="
option and setting
"modele=plsglmfamily"
allows changing the family and link function
the same way as for the glm
function. As a consequence
userspecified families can also be used.
accepts
the links (as names) identity
, log
and
inverse
.
accepts the links (as names)
identity
, log
and inverse
.
accepts the
links (as names) identity
, log
and inverse
.
accepts the links logit
, probit
, cauchit
,
(corresponding to logistic, normal and Cauchy CDFs respectively) log
and cloglog
(complementary loglog).
accepts
the links logit
, probit
, cauchit
, (corresponding to
logistic, normal and Cauchy CDFs respectively) log
and cloglog
(complementary loglog).
accepts the links logit
,
probit
, cauchit
, (corresponding to logistic, normal and Cauchy
CDFs respectively) log
and cloglog
(complementary loglog).
accepts the links inverse
, identity
and
log
.
accepts the links inverse
,
identity
and log
.
accepts the links
inverse
, identity
and log
.
accepts the
links log
, identity
, and
sqrt
.
accepts the links log
,
identity
, and sqrt
.
accepts the links
log
, identity
, and sqrt
.
accepts the links
1/mu^2
, inverse
, identity
and
log
.
accepts the links 1/mu^2
,
inverse
, identity
and log
.
accepts the
links 1/mu^2
, inverse
, identity
and log
.
accepts the links logit
, probit
, cloglog
,
identity
, inverse
, log
, 1/mu^2
and
sqrt
.
accepts the links logit
,
probit
, cloglog
, identity
, inverse
, log
,
1/mu^2
and sqrt
.
accepts the links
logit
, probit
, cloglog
, identity
,
inverse
, log
, 1/mu^2
and sqrt
.
can be used to create a power link function.
can be used to create a power link function.
NonNULL weights can be used to indicate that different observations have different dispersions (with the values in weights being inversely proportional to the dispersions); or equivalently, when the elements of weights are positive integers w_i, that each response y_i is the mean of w_i unitweight observations.
valsPredict 

list("coeffs") 
If the coefficients of the
eXplanatory variables were requested: 
Frédéric Bertrand
frederic.bertrand@math.unistra.fr
https://fbertran.github.io/homepage/
Nicolas Meyer, Myriam MaumyBertrand et Frédéric Bertrand (2010). Comparing the linear and the logistic PLS regression with qualitative predictors: application to allelotyping data. Journal de la Societe Francaise de Statistique, 151(2), pages 118. http://publicationssfds.math.cnrs.fr/index.php/JSFdS/article/view/47
PLS_glm
for more detailed results,
PLS_glm_kfoldcv
for crossvalidating models and
PLS_lm_wvc
for the same function dedicated to plsR models
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58  data(Cornell)
XCornell<Cornell[,1:7]
yCornell<Cornell[,8]
PLS_glm_wvc(dataY=yCornell,dataX=XCornell,nt=3,modele="plsglmgaussian",
dataPredictY=XCornell[1,])
PLS_glm_wvc(dataY=yCornell,dataX=XCornell,nt=3,modele="plsglmfamily",
family=gaussian(),dataPredictY=XCornell[1,], verbose=FALSE)
PLS_glm_wvc(dataY=yCornell[1],dataX=XCornell[1,],nt=3,modele="plsglmgaussian",
dataPredictY=XCornell[1,], verbose=FALSE)
PLS_glm_wvc(dataY=yCornell[1],dataX=XCornell[1,],nt=3,modele="plsglmfamily",
family=gaussian(),dataPredictY=XCornell[1,], verbose=FALSE)
rm("XCornell","yCornell")
## With an incomplete dataset (X[1,2] is NA)
data(pine)
ypine < pine[,11]
data(XpineNAX21)
PLS_glm_wvc(dataY=ypine,dataX=XpineNAX21,nt=10,modele="plsglmgaussian")
rm("XpineNAX21","ypine")
data(pine)
Xpine<pine[,1:10]
ypine<pine[,11]
PLS_glm_wvc(ypine,Xpine,10,modele="pls", verbose=FALSE)
PLS_glm_wvc(ypine,Xpine,10,modele="plsglmGamma", verbose=FALSE)
PLS_glm_wvc(ypine,Xpine,10,modele="plsglmfamily",family=Gamma(), verbose=FALSE)
PLS_glm_wvc(ypine,Xpine,10,modele="plsglmgaussian", verbose=FALSE)
PLS_glm_wvc(ypine,Xpine,10,modele="plsglmfamily",family=gaussian(log), verbose=FALSE)
PLS_glm_wvc(round(ypine),Xpine,10,modele="plsglmpoisson", verbose=FALSE)
PLS_glm_wvc(round(ypine),Xpine,10,modele="plsglmfamily",family=poisson(log), verbose=FALSE)
rm(list=c("pine","ypine","Xpine"))
data(Cornell)
XCornell<Cornell[,1:7]
yCornell<Cornell[,8]
PLS_glm_wvc(yCornell,XCornell,10,modele="plsglminverse.gaussian", verbose=FALSE)
PLS_glm_wvc(yCornell,XCornell,10,modele="plsglmfamily",
family=inverse.gaussian(), verbose=FALSE)
rm(list=c("XCornell","yCornell"))
data(Cornell)
XCornell<Cornell[,1:7]
yCornell<Cornell[,8]
PLS_glm_wvc(dataY=yCornell,dataX=XCornell,nt=3,modele="plsglmgaussian",
dataPredictY=XCornell[1,], verbose=FALSE)
PLS_glm_wvc(dataY=yCornell[1],dataX=XCornell[1,],nt=3,modele="plsglmgaussian",
dataPredictY=XCornell[1,], verbose=FALSE)
rm("XCornell","yCornell")
data(aze_compl)
Xaze_compl<aze_compl[,2:34]
yaze_compl<aze_compl$y
PLS_glm(yaze_compl,Xaze_compl,10,modele="plsglmlogistic",typeVC="none", verbose=FALSE)$InfCrit
PLS_glm_wvc(yaze_compl,Xaze_compl,10,modele="plsglmlogistic", keepcoeffs=TRUE, verbose=FALSE)
rm("Xaze_compl","yaze_compl")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.