simAR1 {ptest} | R Documentation |
An AR(1) series with mean zero and variance 1 and with autocorrelation paramater phi is simulated.
simAR1(n, phi = 0.3)
n |
Length of series. |
phi |
Autocorrelation parameter. |
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=√(1/(1-phi^2)).
Series of length n.
A.I. McLeod
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.