IRF for VAR with standard errors

Questions and discussions on Vector Autoregressions
hashem
Posts: 15
Joined: Sun Dec 12, 2010 10:11 am

IRF for VAR with standard errors

Unread post by hashem »

hello
I am new to RATS usally worked with eviews and microfit but now i need to apply more advanced techniques. I was hopeing someone could help me with graphing impulse response functions for a VAR model with standard errors one graph for each shock for each variable, so that each graph has only one series, kind of like what eviews gives out.

I also needed to test for serial autocrrelation after estimating the var and i couldn't find this in the user guide.

thank you
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: IRF for VAR with standard errors

Unread post by TomDoan »

hashem wrote:hello
I am new to RATS usally worked with eviews and microfit but now i need to apply more advanced techniques. I was hopeing someone could help me with graphing impulse response functions for a VAR model with standard errors one graph for each shock for each variable, so that each graph has only one series, kind of like what eviews gives out.

I also needed to test for serial autocrrelation after estimating the var and i couldn't find this in the user guide.

thank you
The MCGRAPHIRF procedure gives you quite a bit of flexibility for arranging the graphs. PAGE=ONE does one combination of shock and variable per page.

The MVQSTAT procedure does a multivariate test for serial correlation. This is from Lutkepohl's textbook examples.

Code: Select all

*
* Lutkepohl, New Introduction, pp 173-174
* Multivariate Q test
*
open data e1.dat
calendar(q) 1960
data(format=prn,org=columns,skips=6) 1960:01 1982:04 invest income cons
*
set dinc  = log(income/income{1})
set dcons = log(cons/cons{1})
set dinv  = log(invest/invest{1})
*
system(model=varmodel)
variables dinv dinc dcons
lags 1 2
det constant
end(system)
estimate(resids=resids) * 1978:4
*
@mvqstat(lags=1)
# resids
mj_sydney
Posts: 2
Joined: Tue Dec 14, 2010 6:15 pm

Re: IRF for VAR with standard errors

Unread post by mj_sydney »

Hey hashem,
You can use the RATS user guide and the walter enters guide that comes with the software. At least I found it on RATS 7.1. It's pretty useful and has instructions on how to estimate a VAR system or a Near VAR system, then specific a decomposition of your choice (cholesky or some non-recursive) and then estimate the covarinace matrix using the decomposition. and of coruse impulse responses as well. let me know if you can't find it and i'll post the coding or the manual for ya.

cheers

Mj
hashem
Posts: 15
Joined: Sun Dec 12, 2010 10:11 am

Re: IRF for VAR with standard errors

Unread post by hashem »

Thanks Mj I found it.

best
hashem
hashem
Posts: 15
Joined: Sun Dec 12, 2010 10:11 am

Re: IRF for VAR with standard errors

Unread post by hashem »

Dear Tom,

thank you for all your help. could tell me how to do the BG LM test for serial correlation on RAts for the VAR and how to compute the test statistic?

regards
Hashem
Post Reply