Skip to contents

Functions and classes to manage outputs of bootstrap simulations for one (class randboot) or several (class krandboot) statistics

Usage

as.krandboot(obs, boot, quantiles = c(0.025, 0.975), names =
colnames(boot), call = match.call())
# S3 method for class 'krandboot'
print(x, ...)
as.randboot(obs, boot, quantiles = c(0.025, 0.975), call = match.call())
# S3 method for class 'randboot'
print(x, ...)
randboot(object, ...)

Arguments

obs

a value (class randboot) or a vector (class krandboot) with observed statistics

boot

a vector (class randboot) or a matrix (class krandboot) with the bootstrap values of the statistics

quantiles

a vector indicating the lower and upper quantiles to compute

names

a vector of names for the statistics

call

the matching call

x

an object of class randboot or krandboot

object

an object on which bootstrap should be perform

...

other arguments to be passed to methods

Value

an object of class randboot or 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

Author

Stéphane Dray (stephane.dray@univ-lyon1.fr)

Examples

## an example corresponding to 10 statistics and 100 repetitions
bt <- as.krandboot(obs = rnorm(10), boot = matrix(rnorm(1000), nrow = 100))
bt
#> Multiple bootstrap
#> Call: as.krandboot(obs = rnorm(10), boot = matrix(rnorm(1000), nrow = 100))
#> 
#> Number of statistics:   10 
#> 
#> Confidence Interval:
#>    N.rep         Obs       2.5%       97.5%
#> 1    100  1.21408203  0.7715575  4.67941414
#> 2    100  0.06300424 -2.0151553  1.67623176
#> 3    100  0.63448332 -0.8950366  3.04754181
#> 4    100 -0.09939149 -1.9969772  1.34908788
#> 5    100  0.79182714 -0.3287536  3.22141009
#> 6    100 -0.96810189 -4.4294455  0.20871860
#> 7    100 -0.55865763 -2.9482890  0.02828037
#> 8    100  1.42610669  1.1714089  4.65312399
#> 9    100 -1.09529548 -3.9888019 -0.19504235
#> 10   100  0.07309591 -2.0980403  1.83286116
if(adegraphicsLoaded())
plot(bt)