refit.TSLM {fable} | R Documentation |
Refit a TSLM
Description
Applies a fitted TSLM
to a new dataset.
Usage
## S3 method for class 'TSLM'
refit(object, new_data, specials = NULL, reestimate = FALSE, ...)
Arguments
object |
A model for which forecasts are required. |
new_data |
A tsibble containing the time points and exogenous regressors to produce forecasts for. |
specials |
(passed by |
reestimate |
If |
... |
Other arguments passed to methods |
Examples
lung_deaths_male <- as_tsibble(mdeaths)
lung_deaths_female <- as_tsibble(fdeaths)
fit <- lung_deaths_male %>%
model(TSLM(value ~ trend() + season()))
report(fit)
fit %>%
refit(lung_deaths_female) %>%
report()
[Package fable version 0.3.4 Index]