refit.mdl_df {fabletools} | R Documentation |
Refit a mable to a new dataset
Description
Applies a fitted model to a new dataset. For most methods this can be done with or without re-estimation of the parameters.
Usage
## S3 method for class 'mdl_df'
refit(object, new_data, ...)
## S3 method for class 'mdl_ts'
refit(object, new_data, ...)
Arguments
object |
A mable. |
new_data |
A tsibble dataset used to refit the model. |
... |
Additional optional arguments for refit methods. |
Examples
library(fable)
fit <- as_tsibble(mdeaths) %>%
model(ETS(value ~ error("M") + trend("A") + season("A")))
fit %>% report()
fit %>%
refit(as_tsibble(fdeaths)) %>%
report(reinitialise = TRUE)
[Package fabletools version 0.4.2 Index]