generate.ARIMA {fable} | R Documentation |
Generate new data from a fable model
Description
Simulates future paths from a dataset using a fitted model. Innovations are
sampled by the model's assumed error distribution. If bootstrap
is TRUE
,
innovations will be sampled from the model's residuals. If new_data
contains the .innov
column, those values will be treated as innovations.
Usage
## S3 method for class 'ARIMA'
generate(x, new_data, specials, bootstrap = FALSE, ...)
Arguments
x |
A fitted model. |
new_data |
A tsibble containing the time points and exogenous regressors to produce forecasts for. |
specials |
(passed by |
bootstrap |
If |
... |
Other arguments passed to methods |
See Also
Examples
fable_fit <- as_tsibble(USAccDeaths) %>%
model(model = ARIMA(value ~ 0 + pdq(0,1,1) + PDQ(0,1,1)))
fable_fit %>% generate(times = 10)
[Package fable version 0.3.4 Index]