dbl_block_bs: Double seasonal block bootstrap

Description Usage Arguments Details Value Author(s)

View source: R/dbl-block-bs.R

Description

Generates bootstrapped dates using a double seasonal block bootstrap approach.

Usage

1
2
dbl_block_bs(dates, start_date = today(), end_date = today() + 30,
  n_sims = 100, avg_block_len = 14, delta_loc = 3, delta_len = 3)

Arguments

start_date

start date for period we want bootstrap samples for.

end_date

end date for period we want bootstrap samples for.

n_sims

number of simulations. Defaults to 100 simulations.

avg_block_len

average length of blocks. Defaults to 14 days.

delta_loc

amount to randomise current location by when sampling blocks. See details.

delta_len

amount to randomise block length by. See details.

date_series

array of dates.

Details

delta_loc controls how much the current location in the simulated year should be shifted by when sampling from historical data. The shifting amount is seleted from a discrete Uniform(-delta_loc, delta_loc) distribution. Similarly, delta_len controls how much the length of the bootstrap block should be. A smapled block will have length equal to avg_block_len + Uniform(-delta_len, delta_len).

Value

A data frame with two columns. One for simulation number and another for bootstrapped dates.

Author(s)

Cameron Roach


camroach87/gefcom2017 documentation built on March 21, 2020, 11:46 p.m.