View source: R/Module_doBoot.R
doBoot | R Documentation |
Bootstrap to get a forecast interval
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 )
data |
A list. Output of the function |
args.fitmodel |
A list with details depending on model. |
args.calcfc |
A list. |
args.boot |
A list comprising a vector named |
full.out |
A Boolean. Default is FALSE. See value section for details. |
plot.out |
A Boolean. Default is FALSE. Create output plots. |
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.
A vector with percentile values for the interval. If full.out
is TRUE, then a vector with all bootstrapped values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.