Rdocumentation
powered by
Learn R Programming
ptest (version 1.0-8)
simAR1: Simulate AR(1) series
Description
An AR(1) series with mean zero and variance 1 and with autocorrelation paramater phi is simulated.
Usage
simAR1(n, phi = 0.3)
Arguments
n
Length of series.
phi
Autocorrelation parameter.
Value
Series of length n.
Details
The model equation is: z[t] = phi*z[t-1]+a[t], where z[1] is N(0,1) and a[t] are NID(0, siga), $siga=\sqrt(1/(1-phi^2))$.
References
McLeod, A.I., Yu, Hao and Krougly, Z. (2007), Algorithms for Linear Time Series Analysis: With R Package, Journal of Statistical Software 23, 5 1-26.