Skip to contents

Function to perform bootstraped simulations for multiblock principal component analysis with instrumental variables or multiblock partial least squares, in order to get confidence intervals for some parameters, i.e., regression coefficients, variable and block importances

Usage

# S3 method for class 'multiblock'
randboot(object, nrepet = 199, optdim, ...)

Arguments

object

an object of class multiblock created by mbpls or mbpcaiv

nrepet

integer indicating the number of repetitions

optdim

integer indicating the optimal number of dimensions, i.e., the optimal number of global components to be introduced in the model

...

other arguments to be passed to methods

Value

A list containing objects of class krandboot

References

Carpenter, J. and Bithell, J. (2000) Bootstrap confidence intervals: when, which, what? A practical guide for medical statisticians.Statistics in medicine, 19, 1141-1164.

Bougeard, S. and Dray S. (2018) Supervised Multiblock Analysis in R with the ade4 Package. Journal of Statistical Software, 86 (1), 1-17. doi:10.18637/jss.v086.i01

Author

Stéphanie Bougeard (stephanie.bougeard@anses.fr) and Stéphane Dray (stephane.dray@univ-lyon1.fr)

Examples

data(chickenk)
Mortality <- chickenk[[1]]
dudiY.chick <- dudi.pca(Mortality, center = TRUE, scale = TRUE, scannf =
FALSE)
ktabX.chick <- ktab.list.df(chickenk[2:5])
resmbpcaiv.chick <- mbpcaiv(dudiY.chick, ktabX.chick, scale = TRUE,
option = "uniform", scannf = FALSE, nf = 4)
## nrepet should be higher for a real analysis
test <- randboot(resmbpcaiv.chick, optdim = 4, nrepet = 10)
test
#> $XYcoef
#> $XYcoef$Mort7
#> Multiple bootstrap
#> Call: randboot.multiblock(object = resmbpcaiv.chick, nrepet = 10, optdim = 4)
#> 
#> Number of statistics:   20 
#> 
#> Confidence Interval:
#>             N.rep          Obs        2.5%       97.5%
#> Area           10  0.085950032 -0.08268576  0.18499851
#> Soak           10 -0.127497042 -0.22937514 -0.03598424
#> Heat           10 -0.265489511 -0.39683052 -0.14024198
#> Sort           10  0.211732110  0.09506740  0.37009238
#> Renov          10  0.123235977  0.07774201  0.28967588
#> Vitmin         10  0.029172129 -0.35434134  0.21375624
#> Freqchick      10 -0.059863998 -0.21978378  0.04216060
#> Homochick      10 -0.516490179 -0.83638686 -0.25909385
#> NbChick        10 -0.145755039 -0.45888848  0.13175294
#> Typrod         10  0.137730758 -0.06023612  0.21763778
#> Homochicken    10 -0.214346185 -0.44759992 -0.15511415
#> Strain         10 -0.084976485 -0.25893419  0.15469920
#> Locpb          10 -0.150139755 -0.25434551  0.06793457
#> Stress         10 -0.042997762 -0.22165739  0.11848069
#> Freqchicken    10 -0.013488658 -0.20734915  0.07185356
#> LoadType       10 -0.013287061 -0.09369627  0.23376825
#> RainWind       10 -0.001111215 -0.16905044  0.13546932
#> StockingD      10  0.021557816 -0.10228784  0.28090181
#> Dlairage       10 -0.169175517 -0.33118026  0.05797550
#> Evisc          10 -0.087462628 -0.20377180  0.20726281
#> 
#> $XYcoef$Mort
#> Multiple bootstrap
#> Call: randboot.multiblock(object = resmbpcaiv.chick, nrepet = 10, optdim = 4)
#> 
#> Number of statistics:   20 
#> 
#> Confidence Interval:
#>             N.rep         Obs          2.5%       97.5%
#> Area           10 -0.02177842 -0.2906764813 -0.03199464
#> Soak           10 -0.16676037 -0.2589660541 -0.06210993
#> Heat           10 -0.19233216 -0.2375748229 -0.09845715
#> Sort           10  0.07785588  0.0007870915  0.18482677
#> Renov          10  0.03201311 -0.0817361751  0.18678498
#> Vitmin         10 -0.10167257 -0.1614324910 -0.05301646
#> Freqchick      10  0.01497534 -0.0252755340  0.04649107
#> Homochick      10 -0.11777054 -0.2662304312  0.06262298
#> NbChick        10 -0.03508333 -0.1475067892  0.05617100
#> Typrod         10  0.34305114  0.2061533774  0.43054882
#> Homochicken    10 -0.26393644 -0.5091781190 -0.11122306
#> Strain         10 -0.52341446 -0.6572216638 -0.30267332
#> Locpb          10  0.41893706  0.2856196311  0.74575244
#> Stress         10  0.77012837  0.3947149427  1.09216092
#> Freqchicken    10  0.02453140 -0.1343847209  0.11461371
#> LoadType       10  0.04633719  0.0157920200  0.20538511
#> RainWind       10  0.07555523  0.0081066101  0.16483276
#> StockingD      10  0.13001678  0.0545805673  0.31852915
#> Dlairage       10  0.03741639 -0.0643597138  0.16060725
#> Evisc          10 -0.04820679 -0.2584512828  0.10794357
#> 
#> $XYcoef$Doa
#> Multiple bootstrap
#> Call: randboot.multiblock(object = resmbpcaiv.chick, nrepet = 10, optdim = 4)
#> 
#> Number of statistics:   20 
#> 
#> Confidence Interval:
#>             N.rep          Obs          2.5%       97.5%
#> Area           10  0.224056197  0.0286892686  0.35296518
#> Soak           10 -0.264513064 -0.4157298353 -0.17838604
#> Heat           10  0.011755267 -0.1498519738  0.07322891
#> Sort           10  0.121222302  0.0006880545  0.21601020
#> Renov          10  0.002419221 -0.0690008398  0.13051565
#> Vitmin         10 -0.073526898 -0.1523196850 -0.05014631
#> Freqchick      10 -0.016030653 -0.1172192658  0.02774507
#> Homochick      10 -0.069192224 -0.1535119805  0.09827798
#> NbChick        10  0.182877961  0.0732083717  0.26987882
#> Typrod         10  0.025942608 -0.1156879147  0.12613322
#> Homochicken    10  0.148044278  0.0710740381  0.36456366
#> Strain         10 -0.189459932 -0.3248316964 -0.10408086
#> Locpb          10  0.189734967 -0.0822620030  0.36805616
#> Stress         10  0.167973023 -0.0080713420  0.38712001
#> Freqchicken    10  0.092561748 -0.0936997281  0.21541391
#> LoadType       10  0.707231857  0.6316769410  0.98772493
#> RainWind       10  0.318118255  0.2037747847  0.50561996
#> StockingD      10  0.422590200  0.4218511275  0.64135959
#> Dlairage       10  0.294454715  0.1493337127  0.36925021
#> Evisc          10 -0.180765391 -0.4145936088 -0.03237824
#> 
#> $XYcoef$Condemn
#> Multiple bootstrap
#> Call: randboot.multiblock(object = resmbpcaiv.chick, nrepet = 10, optdim = 4)
#> 
#> Number of statistics:   20 
#> 
#> Confidence Interval:
#>             N.rep         Obs        2.5%       97.5%
#> Area           10  0.27006287  0.19817364  0.42450441
#> Soak           10 -0.22808090 -0.43159133 -0.04756265
#> Heat           10 -0.09002826 -0.23251906  0.06050630
#> Sort           10  0.15250842  0.03214723  0.25078198
#> Renov          10  0.18942542  0.07823193  0.33406922
#> Vitmin         10 -0.12573229 -0.21729259 -0.06290754
#> Freqchick      10 -0.20924391 -0.32644460 -0.13155000
#> Homochick      10 -0.04480514 -0.12605798  0.06144504
#> NbChick        10  0.18294103  0.16825683  0.26193409
#> Typrod         10 -0.23231059 -0.37076079 -0.05158464
#> Homochicken    10 -0.28426266 -0.46281804  0.01241291
#> Strain         10 -0.31450938 -0.49313106 -0.24214874
#> Locpb          10  0.31445584  0.13405345  0.56976248
#> Stress         10  0.33424825  0.19381949  0.52126776
#> Freqchicken    10 -0.21904521 -0.27531256 -0.10648053
#> LoadType       10 -0.12741227 -0.44016559 -0.06551399
#> RainWind       10 -0.03286434 -0.15017821  0.01530564
#> StockingD      10 -0.19985852 -0.34265021 -0.17431333
#> Dlairage       10 -0.20701408 -0.41468420 -0.17903158
#> Evisc          10  0.49570852  0.36075539  0.57390371
#> 
#> 
#> $bipc
#> Multiple bootstrap
#> Call: randboot.multiblock(object = resmbpcaiv.chick, nrepet = 10, optdim = 4)
#> 
#> Number of statistics:   4 
#> 
#> Confidence Interval:
#>                       N.rep       Obs       2.5%     97.5%
#> FarmStructure            10 0.1396215 0.08213221 0.1731540
#> OnFarmHistory            10 0.1699454 0.07489293 0.2439964
#> FlockCharacteristics     10 0.4130085 0.30366358 0.4724558
#> CatchingTranspSlaught    10 0.2774246 0.21691033 0.3404706
#> 
#> $vipc
#> Multiple bootstrap
#> Call: randboot.multiblock(object = resmbpcaiv.chick, nrepet = 10, optdim = 4)
#> 
#> Number of statistics:   20 
#> 
#> Confidence Interval:
#>             N.rep         Obs         2.5%       97.5%
#> Area           10 0.019021226 -0.015253286 0.035357702
#> Soak           10 0.021212869 -0.002834304 0.034055449
#> Heat           10 0.013197420 -0.010234858 0.022054209
#> Sort           10 0.013099040 -0.005539019 0.024084616
#> Renov          10 0.007421402 -0.004864675 0.013776894
#> Vitmin         10 0.003391625 -0.030857330 0.005639478
#> Freqchick      10 0.004753272 -0.010634591 0.007151082
#> Homochick      10 0.064052395 -0.012909956 0.121576453
#> NbChick        10 0.015960399 -0.001759870 0.025672103
#> Typrod         10 0.052742131 -0.009329783 0.073332101
#> Homochicken    10 0.055354532 -0.019164733 0.087270102
#> Strain         10 0.112544049  0.031392176 0.178538040
#> Locpb          10 0.087275951 -0.001302441 0.151087331
#> Stress         10 0.193484920  0.025894851 0.301632042
#> Freqchicken    10 0.018566556 -0.004364173 0.025383359
#> LoadType       10 0.146563153  0.172112790 0.256511899
#> RainWind       10 0.027262859  0.006097714 0.050072731
#> StockingD      10 0.052194126  0.052799994 0.089713952
#> Dlairage       10 0.043227691  0.029371121 0.070394374
#> Evisc          10 0.048674385 -0.034825550 0.066769743
#> 
if(adegraphicsLoaded())
plot(test$bipc)