[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## generate AR(1) data

**From**: |
Heber Farnsworth |

**Subject**: |
generate AR(1) data |

**Date**: |
Wed, 16 Jul 2003 21:39:19 -0500 |

`This is probably a simple question but I'm stumped and if someone knows
``the answer off the top of their head it would greatly speed up my code.
`

`I need to generate a large number of random (Gaussian) vectors that
``have an AR(1) correlation structure. Obviously I could do this in a
``loop but this is slow. I would rather rotate a vector of IID normal
``draws so that the result will have the right covariance matrix. So
``what I need is the matrix square root of a symmetric toeplitz matrix
`
1 .5 .25 .125 ...
.5 1 .5 .25 ...
.25 .5 1 .5 ...

`etc (here the correlation is .5). It seems inefficient to try to
``compute this square root numerically. Isn't it known in closed form?
`
Heber Farnsworth
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------

**generate AR(1) data**,
*Heber Farnsworth* **<=**