Page 1 of 1

Extracting residuals in a VAR model

Posted: Thu May 25, 2017 10:03 am
by tr206
Hi,
I am working on a VAR model with six variables. Now I want to estimate the corresponding residuals of each variable in the VAR and use the residuals in a Granger-causality test to test whether shocks in a variable Granger-cause another variable.

How can I extract the residuals of each variable?

Thanks for your help.

Re: Extracting residuals in a VAR model

Posted: Fri May 26, 2017 2:51 pm
by dakila

Code: Select all

var01.makeresids

Re: Extracting residuals in a VAR model

Posted: Sat May 27, 2017 4:30 am
by tr206
Many thanks. It works well.

One last question: The header of the columns do not show the names of the variables but RESID01, RESID02 etc. Can I somehow attribute the variable names to the columns of residuals? Which variable is the header RESID01 or RESID02 referring to?

Re: Extracting residuals in a VAR model

Posted: Sat May 27, 2017 2:54 pm
by dakila

Code: Select all

var var01.ls 1 4 y1 y2 y3 var01.makeresids ry1 ry2 ry3
resid01 (ry1) corresponds to first variable (y1) of VAR Model.
resid02 (ry2) corresponds to second variable (y2) of VAR Model. So on.