simAR1: Simulate AR(1) series

Description Usage Arguments Details Value Author(s) References

Description

An AR(1) series with mean zero and variance 1 and with autocorrelation paramater phi is simulated.

Usage

1
simAR1(n, phi = 0.3)

Arguments

n

Length of series.

phi

Autocorrelation parameter.

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=√(1/(1-phi^2)).

Value

Series of length n.

Author(s)

A.I. McLeod

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.


ptest documentation built on May 2, 2019, 5:58 a.m.