View source: R/time_series_model.R
| ar1 | R Documentation |
time_series_model)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)
phi |
AR(1) coefficient in (-1, 1). |
sigma2 |
Innovation variance (> 0). |
A time_series_model object.
mod <- ar1(phi = 0.8, sigma2 = 1)
mod
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.