Description Usage Arguments Details Value Note Author(s) References See Also Examples
Simulate a mean-zero stationary Gaussian AR(p) time series.
1 | SimulateGaussianAR(phi, n = 100, InnovationVariance = 1)
|
phi |
vector containing AR coefficients |
n |
length of time series |
InnovationVariance |
innovation variance |
The p initial values are simulated using the appropriate multivariate distribution as was suggested in McLeod (1975). The R function rnorm() is used.
A vector of length n, the simulated series
If the process is non-stationary, then random initial values are used determined by the first p innovations.
A.I. McLeod
McLeod, A.I. (1975), Derivation of the theoretical autocorrelation function of autoregressive moving-average time series, Applied Statistics 24, 255–256. Percival, D.B. and Walden, A.T. (1993), Spectral Analysis for Physical Applications.
1 2 3 4 5 6 7 | #Percival and Walden (1993, p.46) illustrated a time series with a
#very peaked spectrum with the AR(4) with coefficients
#c(2.7607,-3.8106,2.6535,-0.9238) with NID(0,1) innovations.
#
z<-SimulateGaussianAR(c(2.7607,-3.8106,2.6535,-0.9238),1000)
library(lattice)
TimeSeriesPlot(z)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.