Hi there,
How to create IRF using exogenous variable shocks such as oil, USGDP and China GDP?
Thanks very much
Rong
VAR exogenous variable shock
Moderators: EViews Gareth, EViews Moderator
VAR exogenous variable shock
- Attachments
-
- VAR exgenous variable shock.wf1
- (256.95 KiB) Downloaded 89 times
-
- Posts: 17
- Joined: Wed Jun 23, 2021 1:48 pm
Re: VAR exogenous variable shock
It's possible to do this, but not easy. It can be done by imposing restrictions on the coefficients in the "VAR Restrictions" tab.
Essentially, you need to 1) add the exogenous variables as endogenous variables, and 2) make sure that, for the equation for the exogenous variable, all the lags on the coefficients of the lags of the other variables are forced to be equal to zero, and 3) make sure you either put the exogenous variables first (if you're using a Choleski identification) or impose a zero restriction of zero in the short-run impulse response matrix, such that the structural shocks over other variables don't affect your exogenous variable.
Essentially, you need to 1) add the exogenous variables as endogenous variables, and 2) make sure that, for the equation for the exogenous variable, all the lags on the coefficients of the lags of the other variables are forced to be equal to zero, and 3) make sure you either put the exogenous variables first (if you're using a Choleski identification) or impose a zero restriction of zero in the short-run impulse response matrix, such that the structural shocks over other variables don't affect your exogenous variable.
Re: VAR exogenous variable shock
random_user wrote:It's possible to do this, but not easy. It can be done by imposing restrictions on the coefficients in the "VAR Restrictions" tab.
Essentially, you need to 1) add the exogenous variables as endogenous variables, and 2) make sure that, for the equation for the exogenous variable, all the lags on the coefficients of the lags of the other variables are forced to be equal to zero, and 3) make sure you either put the exogenous variables first (if you're using a Choleski identification) or impose a zero restriction of zero in the short-run impulse response matrix, such that the structural shocks over other variables don't affect your exogenous variable.
Hi thanks very much.
Could you please provide more details like a screenshot or how to do this using a program?
-
- EViews Developer
- Posts: 560
- Joined: Thu Apr 25, 2013 7:48 pm
Re: VAR exogenous variable shock
Hello,
Depending on what you're after, it may be easier to use a custom impulse vector that matches the effect of the exogenous variable. For example, the following code simulates a one unit shock to the exogenous variable z.
Depending on what you're after, it may be easier to use a custom impulse vector that matches the effect of the exogenous variable. For example, the following code simulates a one unit shock to the exogenous variable z.
Code: Select all
wfcreate u 100
series x = nrnd
series y = rnd / 5 + .2
series z = rnd
var v.ls 1 2 x @pch(y) @ c z
matrix v_coefs = v.@coefmat
vector impulse = v_coefs.@row(6) ' This row holds the estimated coefficents on z.
v.impulse(imp=user, fname=impulse, se=none)
Who is online
Users browsing this forum: No registered users and 23 guests