Constructs a time_series_model for a stationary AR(1) process with parameter
phi and innovation variance sigma2.
The model is
\(X_t = \phi X_{t-1} + \varepsilon_t, \; \varepsilon_t \stackrel{\text{i.i.d.}}{\sim} N(0, \sigma^2)\).
The autocovariance is
\(
\gamma(h) = \mathrm{cov}(X_t, X_{t+h})
= \frac{\sigma^2}{1 - \phi^2}\,\phi^{\lvert h \rvert}
\).
ar1(phi = NULL, sigma2 = NULL)A time_series_model object.
mod <- ar1(phi = 0.8, sigma2 = 1)
mod
#> Stochastic process
#> Model : AR(1)
#> Parameters : phi = 0.8, sigma2 = 1