stat.boot: Stationary Bootstrap

View source: R/statboot.R

stat.bootR Documentation

Stationary Bootstrap

Description

Creates one bootstrap sample of a N by d matrix, X. Here N denotes the number of time points and d the number of sampling locations. The stationary bootstrap (Politis and Romano, 1994) generates a bootstrap sample by repeated sampling of random blocks with expected value block.size until a sample of length N has been created.

Usage

stat.boot(X, mean.block.size)

Arguments

X

Matrix with N rows corresponding to time points and d columns corresponding to spatial locations.

mean.block.size

Expected value of temporal block size.

References

Politis and Romano (1994), JASA,5(4):303-336, (doi)

Examples

N by d matrix

data(Aus_Heat)
Z<-Aus_Heat$Temp.

unif<-function(x) rank(x)/(length(x)+1)
Z_U<-Z
for(i in 1:dim(Z_U)[2]) Z_U[,i]<-unif(Z[,i]) # Transform to uniform margins

q<-0.95

ind.triple<-c(1,2,3) ##Denotes indices of triple for which triple-wise chi calculated.

block.mean<-14 #Mean block size for random block choice - Here a fortnight

boot <- stat.boot(Z_U[,ind.triple],block.mean)

#Create one bootstrap estimate of triple-wise chi
chi3.emp(boot[,1],boot[,2],boot[,3],q)


Jbrich95/sdfExtreme documentation built on March 24, 2022, 11:15 a.m.