| gen_ar1 | R Documentation |
Generate an Autoregressive Order 1 sequence given \phi and \sigma^2.
gen_ar1(N, phi = 0.3, sigma2 = 1)
N |
An |
phi |
A |
sigma2 |
A |
The function implements a way to generate the AR(1)'s x_t values without calling the general ARMA function.
Thus, the function is able to generate values much faster than gen_arma.
A vec containing the AR(1) process.
The Autoregressive order 1 (AR1) process with non-zero parameter \phi \in (-1,+1) and \sigma^2 \in {\rm I\!R}^{2}.
This process is defined as:
{X_t} = {\phi _1}{X_{t - 1}} + {\varepsilon_t}
, where
{\varepsilon_t}\mathop \sim \limits^{iid} N\left( {0,\sigma^2} \right)
AR(1) processes are sometimes used as an approximation for Bias Instability noises.
The function first generates a vector of White Noise with length N+1 using gen_wn and then obtains the
autoregressive values under the above process definition.
The X_0 (first value of X_t) is discarded.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.