forecast.TSLM | R Documentation |
Produces forecasts from a trained model.
## S3 method for class 'TSLM' forecast( object, new_data, specials = NULL, bootstrap = FALSE, approx_normal = TRUE, times = 5000, ... )
object |
The time series model used to produce the forecasts |
new_data |
A |
specials |
(passed by |
bootstrap |
If |
approx_normal |
Should the resulting forecast distributions be approximated as a Normal distribution instead of a Student's T distribution. Returning Normal distributions (the default) is a useful approximation to make it easier for using TSLM models in model combinations or reconciliation processes. |
times |
The number of sample paths to use in estimating the forecast distribution when |
... |
Additional arguments for forecast model methods. |
A list of forecasts.
as_tsibble(USAccDeaths) %>% model(lm = TSLM(log(value) ~ trend() + season())) %>% forecast()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.