doBoot: Bootstrap to get a forecast interval

Description Usage Arguments Details Value

View source: R/Module_doBoot.R

Description

Bootstrap to get a forecast interval

Usage

1
2
3
4
5
6
7
8
9
doBoot(
  data,
  args.fitmodel = list(model = "Naive", settings = list(avg.yrs = 3)),
  args.calcfc = list(fc.yr = NULL, settings = NULL),
  args.boot = list(boot.type = c("meboot", "stlboot"), boot.n = 100, plot.diagnostics =
    FALSE),
  full.out = FALSE,
  plot.out = FALSE
)

Arguments

data

A list. Output of the function prepData.

args.fitmodel

A list with details depending on model.

args.calcfc

A list.

args.boot

A list comprising a vector named boot.type with one of two possible values: "meboot" (maximum entropy bootstrap) or "stlboot" (STL/Loess bootstrap).

full.out

A Boolean. Default is FALSE. See value section for details.

plot.out

A Boolean. Default is FALSE. Create output plots.

Details

The steps and subroutines differ by model, but the output is the same regardless. If time series model: use meboot subroutine as default, stlboot as option. Also have Box-Cox on/off option. If sibreg model: use "classic" bootstrap by dropping some obs and refitting. If naive model: use retrospective resids (as in Fraser Sox FC? -> check details) (why not same as time series model?). A separate bootstrap interval will be done as part of the doRetro() module. The structure of this function is generic, and it runs for all the model types. However, bootstrapped intervals using this approach may not be appropriate for some models.

Value

A vector with percentile values for the interval. If full.out is TRUE, then a vector with all bootstrapped values.


MichaelFolkes/forecastR_package documentation built on April 4, 2021, 5:14 a.m.