regenboot {boodd} | R Documentation |
Regenerative and Approximative Regenerative Block Bootstrap.
Description
Performs regenerative block bootstrap and approximately regenerative block bootstrap on a Markov chain, either in the atomic case or in the general Harris case.
Usage
regenboot(
x,
func,
B,
...,
atom,
small = NULL,
s = median(x),
plotIt = FALSE,
moon = length(x)
)
Arguments
x |
A numeric vector representing a Markov process. |
func |
The function to apply to each sample. |
B |
A positive integer; the number of bootstrap replications. |
... |
Optional additional arguments for the |
atom |
A numeric value or a string; an atom of the Markov chain in the atomic case. |
small |
An object of class |
s |
A real number specifying the center of the small set. Default is the median of |
plotIt |
Logical. If |
moon |
A positive integer. Default is length of |
Details
This function regenboot
implements two different kinds of
regenerative bootstrap:
-
A regenerative block bootstrap used for atomic Markov chains.
-
An approximate regenerative block bootstrap used to bootstrap Harris recurrent Markov chains based on a given small set of the form
[s-eps,s+eps]
where s is the center and eps the radius.
One must specify either the atom
argument or the small
argument. In the first case, atom
is the state used to split the
Markov chain into blocks ending with the atom. In the second case,
small
is an object of class smallEnsemble
representing the
small ensemble. Such objects are typically
obtained using the findBestEpsilon
function but may also be constructed
manually using the smallEnsemble
function.
Value
returns an object of class boodd
.
References
Bertail, P. and Dudek, A. (2025). Bootstrap for Dependent Data, with an R package (by Bernard Desgraupes and Karolina Marek) - submitted.
Bertail, P., Clémençon, S. (2006a). Regenerative Block Bootstrap for Markov Chains. Bernoulli, 12, 689-712.
Bertail, P. and Clémençon, S. (2006b). Regeneration-based statistics for Harris recurrent Markov chains. Lecture notes in Statistics, vol. 187, pp. 1-54, Springer.
Radulović, D. (2004). Renewal type bootstrap for Markov chains. Test, 13, 147-192.
See Also
boots
,
blockboot
,
plot.boodd
,
confint.boodd
, findBestEpsilon
,smallEnsemble
.
Examples
B <- 299
n <- 200
# Atomic Boostrap
acgt <- c("A","C","G","T")
probs <- c(.3,.1,.3,.3)
atom <- "C"
set.seed(1)
x <- sample(acgt,n,prob=probs,repl=TRUE)
propAtom <- function(x) {
tbl <- as.vector(table(x))
prop <- tbl[3]/length(x)
return(prop)
}
boo <- regenboot(x,propAtom,B,atom=atom)
plot(boo)
# Approximate regenerative bootstrap with estimated small set
ar <- arima.sim(list(c(1,0,0),ar=0.6),n=500)
# Find the small ensemble with the largest number of regenerations
sm <- findBestEpsilon(ar,s=0,plotIt=TRUE)
# Approximate regenerative bootstrap of the mean
rboo <- regenboot(ar,mean,small=sm,B=999, plotIt=TRUE)
# Plot the corresponding bootstrap distribution
plot(rboo)
# Compute the bootstrap percentile confidence interval
confint(rboo)