Page 1 of 1
IRF for VAR with standard errors
Posted: Mon Dec 13, 2010 4:44 pm
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
Re: IRF for VAR with standard errors
Posted: Wed Dec 15, 2010 10:49 am
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
Re: IRF for VAR with standard errors
Posted: Mon Dec 20, 2010 7:19 pm
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
Re: IRF for VAR with standard errors
Posted: Wed Jan 05, 2011 4:53 pm
by hashem
Thanks Mj I found it.
best
hashem
Re: IRF for VAR with standard errors
Posted: Wed Jan 05, 2011 4:56 pm
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