Searches through the vector of lag orders to find the best AR model which
has lowest AIC, AICc or BIC value. It is implemented using OLS, and behaves
AR(formula, ic = c("aicc", "aic", "bic"), ...)
Model specification (see "Specials" section).
The information criterion used in selecting the model.
Further arguments for arima
A model specification.
Exogenous regressors and
common_xregs can be specified in the model
order special is used to specify the lag order for the auto-regression.
|The order of the auto-regressive (AR) terms. If multiple values are provided, the one which minimises |
|A named list of fixed parameters for coefficients. The names identify the coefficient, beginning with |
Exogenous regressors can be included in an ARIMA model without explicitly using the
xreg() special. Common exogenous regressor specials as specified in
common_xregs can also be used. These regressors are handled using
stats::model.frame(), and so interactions and other functionality behaves similarly to
The inclusion of a constant in the model follows the similar rules to
stats::lm(), where including
1 will add a constant and
-1 will remove the constant. If left out, the inclusion of a constant will be determined by minimising
xreg(..., fixed = list())
|Bare expressions for the exogenous regressors (such as |
|A named list of fixed parameters for coefficients. The names identify the coefficient, and should match the name of the regressor. For example, |
luteinizing_hormones <- as_tsibble(lh) fit <- luteinizing_hormones %>% model(AR(value ~ order(3))) report(fit)#> Series: value #> Model: AR(3) w/ mean #> #> Coefficients: #> constant ar1 ar2 ar3 #> 1.5375 0.6578 -0.0658 -0.2348 #> #> sigma^2 estimated as 0.1905 #> AIC = -14.48 AICc = -13.55 BIC = -7fit %>% forecast() %>% autoplot(luteinizing_hormones)