Applies a fitted ARIMA model to a new dataset.
# S3 method for ARIMA refit(object, new_data, specials = NULL, reestimate = FALSE, ...)
object | The time series model used to produce the forecasts |
---|---|
new_data | A |
specials | (passed by |
reestimate | If |
... | Additional arguments for forecast model methods. |
A refitted model.
lung_deaths_male <- as_tsibble(mdeaths) lung_deaths_female <- as_tsibble(fdeaths) fit <- lung_deaths_male %>% model(ARIMA(value ~ 1 + pdq(2, 0, 0) + PDQ(2, 1, 0))) report(fit)#> Series: value #> Model: ARIMA(2,0,0)(2,1,0)[12] w/ drift #> #> Coefficients: #> ar1 ar2 sar1 sar2 constant #> 0.2480 -0.3326 -0.9903 -0.4766 -146.0254 #> s.e. 0.1392 0.1393 0.1340 0.1356 25.6430 #> #> sigma^2 estimated as 28448: log likelihood=-397.01 #> AIC=806.03 AICc=807.61 BIC=818.59fit %>% refit(lung_deaths_female) %>% report()#> Series: value #> Model: ARIMA(2,0,0)(2,1,0)[12] w/ drift #> #> Coefficients: #> ar1 ar2 sar1 sar2 constant #> 0.2480 -0.3326 -0.9903 -0.4766 -146.0254 #> s.e. 0.1392 0.1393 0.1340 0.1356 25.6430 #> #> sigma^2 estimated as 14165: log likelihood=-378.7 #> AIC=759.41 AICc=759.48 BIC=761.5