Simulating multiple AR(1) series
Posted: Tue Mar 08, 2011 11:06 am
Hello,
I am trying to replicate a paper results, where I want to generate multiple (say, 10) AR(1) processes with AR(1) parameters randomly drawn from the [0.48,0.83] interval, and disturbances drawn from a zero-mean normal distribution where the standard deviation was randomly selected from the [0.005,0.014] interval. I have been trying to play with the following code without any success:
*--------------- begin --------------
seed 2011
all 100
set y = 0
com alpha = %uniform(.48,.83)
com sd = %uniform(.005,.014)
set et = %ran(sd)
do i = 1,10
set y(i) 2 100 = alpha*y{1}+et
end do i
*--------------- end --------------
Definitely I am missing something here. Your help will be highly appreciated. Thank you.
Basher
I am trying to replicate a paper results, where I want to generate multiple (say, 10) AR(1) processes with AR(1) parameters randomly drawn from the [0.48,0.83] interval, and disturbances drawn from a zero-mean normal distribution where the standard deviation was randomly selected from the [0.005,0.014] interval. I have been trying to play with the following code without any success:
*--------------- begin --------------
seed 2011
all 100
set y = 0
com alpha = %uniform(.48,.83)
com sd = %uniform(.005,.014)
set et = %ran(sd)
do i = 1,10
set y(i) 2 100 = alpha*y{1}+et
end do i
*--------------- end --------------
Definitely I am missing something here. Your help will be highly appreciated. Thank you.
Basher