I've been trying to run the code below, but EViews suddenly closes every time I run it. What I want to do is generate an asymmetric IRF for var1 to var5 by estimating a sequential LP from externally identified shocks shocka to shockd. The categorical variable I'm using is pos_shocka to pos_shockc which is equal to 1 if the shock variable is positive and 0 otherwise.
Code: Select all
for %y var1 var2 var3 var4 var5
for %z shocka shockb shockc
smpl 2002 2023 if {%y} <> na
var lp_{%y}_{%z}.ls 1 2 {%y} shock_{%z} @ c @trend
freeze(gr_{%y}_{%z}) lp_{%y}_{%z}.impulse(irtype=lp, hrz=12, hac, lag=a, infosel=irhorizon, asym=pos_{%z}) {%y} @imp {%z}
next
next
