bootstrap_block: Implements a block bootstrap

View source: R/bootstrap_block.R

bootstrap_blockR Documentation

Implements a block bootstrap

Description

This function performs block bootstrapping on a given dataset.

Usage

bootstrap_block(data, k = 14)

Arguments

data

Data frame of raw data detrended if necessary. First column should be of the Date.

k

Numeric vector of length one specifying the block length. Default is 14.

Value

Dataframe containing th eblock bootstap sample.

Examples

#Boostrap the detrended data at site S-22
boot_df = bootstrap_block(S22.Detrend.df[,2:3])
#Calculate the mean of the drivers in bootstrapped sample
apply(boot_df,2,function(x) mean(x,na.rm=T))

rjaneUCF/MultiHazard documentation built on March 29, 2025, 3:22 p.m.