View source: R/tilt.bootplsglm.R
tilt.bootplsglm  R Documentation 
Provides a wrapper for the bootstrap function tilt.boot
from the
boot
R package.
Implements nonparametric tilted bootstrap for PLS
generalized linear regression models by case resampling : the
tilt.boot
function will run an initial bootstrap with equal
resampling probabilities (if required) and will use the output of the
initial run to find resampling probabilities which put the value of the
statistic at required values. It then runs an importance resampling
bootstrap using the calculated probabilities as the resampling distribution.
tilt.bootplsglm(
object,
typeboot = "fmodel_np",
statistic = coefs.plsRglm,
R = c(499, 250, 250),
alpha = c(0.025, 0.975),
sim = "ordinary",
stype = "i",
index = 1,
stabvalue = 1e+06,
...
)
object 
An object of class 
typeboot 
The type of bootstrap. Either (Y,X) boostrap
( 
statistic 
A function which when applied to data returns a vector
containing the statistic(s) of interest. 
R 
The number of bootstrap replicates. Usually this will be a single
positive integer. For importance resampling, some resamples may use one set
of weights and others use a different set of weights. In this case 
alpha 
The alpha level to which tilting is required. This parameter is
ignored if 
sim 
A character string indicating the type of simulation required.
Possible values are 
stype 
A character string indicating what the second argument of

index 
The index of the statistic of interest in the output from

stabvalue 
Upper bound for the absolute value of the coefficients. 
... 
ny further arguments can be passed to 
An object of class "boot".
Frédéric Bertrand
frederic.bertrand@utt.fr
https://fbertran.github.io/homepage/
tilt.boot
data(aze_compl)
Xaze_compl<aze_compl[,2:34]
yaze_compl<aze_compl$y
dataset < cbind(y=yaze_compl,Xaze_compl)
# LazraqCleroux PLS bootstrap Classic
aze_compl.tilt.boot < tilt.bootplsglm(plsRglm(yaze_compl,Xaze_compl,3,
modele="plsglmlogistic", family=NULL), statistic=coefs.plsRglm, R=c(499, 100, 100),
alpha=c(0.025, 0.975), sim="ordinary", stype="i", index=1)
boxplots.bootpls(aze_compl.tilt.boot,1:2)
aze_compl.tilt.boot2 < tilt.bootplsglm(plsRglm(yaze_compl,Xaze_compl,3,
modele="plsglmlogistic"), statistic=coefs.plsRglm, R=c(499, 100, 100),
alpha=c(0.025, 0.975), sim="ordinary", stype="i", index=1)
boxplots.bootpls(aze_compl.tilt.boot2,1:2)
aze_compl.tilt.boot3 < tilt.bootplsglm(plsRglm(yaze_compl,Xaze_compl,3,
modele="plsglmfamily", family=binomial), statistic=coefs.plsRglm, R=c(499, 100, 100),
alpha=c(0.025, 0.975), sim="ordinary", stype="i", index=1)
boxplots.bootpls(aze_compl.tilt.boot3,1:2)
# PLS bootstrap balanced
aze_compl.tilt.boot4 < tilt.bootplsglm(plsRglm(yaze_compl,Xaze_compl,3,
modele="plsglmlogistic"), statistic=coefs.plsRglm, R=c(499, 100, 100),
alpha=c(0.025, 0.975), sim="balanced", stype="i", index=1)
boxplots.bootpls(aze_compl.tilt.boot4,1:2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.