Shock to exogenous variable
Shock to exogenous variable
Hello,Tom!I got a question about impulse response of linear regression.The regression equation is attached,What should i do to construct the IRF of variable Yt to shock of variable Zt,like considering the impulse of output to oil price shock...should I use impulse option or forecast?
- Attachments
-
- equation.GIF (2.05 KiB) Viewed 6941 times
Shock to exogenous variable
As you have that written (is the t+h a typo?) that's an ARDL model which can be handled as described in Chapter 2 of the User's Guide.
In order to use IMPULSE on this, you have to "endogenize" the Z variable by creating an empty equation with Z as the dependent variable. See, for instance, MONTEEXOGVAR.RPF.
In order to use IMPULSE on this, you have to "endogenize" the Z variable by creating an empty equation with Z as the dependent variable. See, for instance, MONTEEXOGVAR.RPF.
Re: Shock to exogenous variable
Thank you for your help,the typo t+h is becuase I want to calulate sth like ,how can i write them into a loop?I wanna get the coefficents of the shock variable and stderrs in series...
Code: Select all
linreg(lags=30,lwindow=newey) LIND
# constant LIND{1} LIND{2} SHOCK{1}
linreg(lags=30,lwindow=newey) LIND
# constant LIND{2} LIND{3} SHOCK{2}
linreg(lags=30,lwindow=newey) LIND
# constant LIND{3} LIND{4} SHOCK{3}
linreg(lags=30,lwindow=newey) LIND
# constant LIND{4} LIND{5} SHOCK{4}
linreg(lags=30,lwindow=newey) LIND
# constant LIND{5} LIND{6} SHOCK{5}
Re: Shock to exogenous variable
Code: Select all
clear(zeros) betas stderrs
do lag=1,5
linreg(lags=30,lwindow=newey) LIND
# constant LIND{lag lag+1} SHOCK{lag}
compute betas(lag)=%beta(4)
compute stderrs(lag)=%stderrs(4)
end do lag