Description Usage Arguments Details Value Author(s)
Generates bootstrapped dates using a double seasonal block bootstrap approach.
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)
|
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. |
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).
A data frame with two columns. One for simulation number and another for bootstrapped dates.
Cameron Roach
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.