my problem is the following one: I want to create a Monte Carlo Simulation with generating two different time series of a AR(1)-Process. Therefore, I generate two independet times series with different white noise processes (different standard deviations). Subsequently, the one lagged values of both times series will be regressed on the endogeneous variable of the first time series. The crucial point is then to find out how many of the 1000 t-statistics of the lagged value from the other time series are significant on the 5%-level.
This is my program code:
Code: Select all
!length = 480
!sample = 400
wfcreate HP u 1 !length
!mcmax = 1000
for !phi1 = 0.1 to 1 step 0.1
for !phi2 = 0.1 to 1 step 0.1
!phi110 = 10*!phi1
!phi210 = 10*!phi2
vector(!mcmax) tstat_0!phi110_0!phi210
vector(!mcmax) pwerte_0!phi110_0!phi210
for !i = 1 to !mcmax
smpl 1 1
genr y1 = 0
genr y2 = 0
smpl 2 !length
genr epsilon = @nrnd*0.0375
genr psi = @nrnd*0.15
genr y1 = !phi1*y1(-1)+epsilon
genr y2 = !phi2*y2(-1)+psi
smpl !lentgh-!sample+1 !length
'Estimation
equation hptest.ls y1 y1(-1) y2(-1)
tstat_0!phi110(!i)_0!phi210(!i) = hptest.@tstat(2)
pwerte_0!phi110(!i)_0!phi210(!i) = hptest.@pval(2)
next
next
next"VECTOR(1000) TSTAT_0!PHI110_01".
Could you give me an indication why it doesn’t work?
Thank you in advance for your efforts.
