para.boot {boodd}R Documentation

Parametric Bootstrap for i.i.d. Data

Description

This function performs a parametric bootstrap, a technique that resamples data based on an assumed distribution with estimated parameter, rather than resampling the original data directly.

Usage

para.boot(X, func, rdist, param, B = 999, ...)

Arguments

X

A numeric vector representing the data.

func

A function taking X as an argument, representing the statistic of interest to be bootstrapped. It should returns a vector of size p >= 1.

rdist

A parametric distribution generator that produces bootstrap data based on the data size and param. It should be a function with two arguments n - the size of the bootstrap sample and par - a vector of the parameters.

param

Numeric vector. Values of parameters used to generate the bootstrap data. These can be either the true parameter values for Monte Carlo approximation of the true distribution, or the estimated parameters, typically obtained by the maximum likelihood method.

B

A positive integer; the number of bootstrap replications. By default it is 999.

...

Optional additional arguments for the func function.

Details

para.boot is a flexible function for bootstrapping a specified function func using a parametric distribution rdist generated with estimated or true parameters param. The function returns a boodd object containing the values of the function over all bootstrap samples and the statistic computed over the original sample.

Value

A boodd object containing:

References

Bertail, P. and Dudek, A. (2025). Bootstrap for Dependent Data, with an R package (by Bernard Desgraupes and Karolina Marek) - submitted..

Efron, B., Tibshirani, R. (1993). An Introduction to the Bootstrap, Chapman and Hall.

See Also

bootglm, boots.

Examples

rn<-function(n,par) {rnorm(n,mean=par[1],sd=par[2])}
set.seed(5)
# Parametric bootstrap of the mean in a gaussian family
X=rnorm(n=100,mean=2,sd=1)
# simulate distribution with true parameter values (and a Monte-Carlo size 9999
true1<-para.boot(X,mean,rn,param=c(2,1),B=9999)
pb1<-para.boot(X,mean,rn,param=c(mean(X),sd(X)))
plot(pb1)
lines(density(true1$s),col="red")
confint(true1,method="bperc")
confint(pb1, method="all")


[Package boodd version 0.1 Index]