Measuring comovement wit VAR forecast errors
-
turkhanali
- Posts: 15
- Joined: Fri Jul 17, 2009 1:47 am
Measuring comovement wit VAR forecast errors
Dear All,
I am trying to write RATS code to implement Secion 3 and Section 4 of Paper by Wouter Haan and Steven Sumner (2004), 'The comovement between real activity and Price in the G7', European Economic Review 48: 1333-1347. In which they measured the comovement between price and output using the correlation coeffient of forecast errors from vector autoregressive (VAR) system at different forecast horizons as proposed by DEn Haan (2000). As my my understanding, they implemented using RATS code. my questions is does any have such kind code to calculate the cross correlations coefficient and come out with graph such as figure 1 shown the above mentioned paper. Is it possible to do graph as figure 1 using RATS, having different symbol to indicate the significance of the correlations coefficents.
Thanks in advance.
I am trying to write RATS code to implement Secion 3 and Section 4 of Paper by Wouter Haan and Steven Sumner (2004), 'The comovement between real activity and Price in the G7', European Economic Review 48: 1333-1347. In which they measured the comovement between price and output using the correlation coeffient of forecast errors from vector autoregressive (VAR) system at different forecast horizons as proposed by DEn Haan (2000). As my my understanding, they implemented using RATS code. my questions is does any have such kind code to calculate the cross correlations coefficient and come out with graph such as figure 1 shown the above mentioned paper. Is it possible to do graph as figure 1 using RATS, having different symbol to indicate the significance of the correlations coefficents.
Thanks in advance.
Re: Measuring comovement wit VAR forecast errors
For either GRAPH or SCATTER, if you want to take a series and graph part of its range in one symbol/color/pattern and part of it in another, use %IF to NA out the desired ranges out of copies of the series. For instance, this does an x-y scatter using one symbol for the data through 1973:1 and another for after that:
The result looks like:
Note that you don't graph the original logp, but the two copies with different NA-ranges. This particular case could also be done with
but that only works when the ranges are consecutive sets of entries.
Code: Select all
set logp1973 = %if(t<=1973:1,logp,%na)
set logp1974 = %if(t>1973:1,logp,%na)
scatter(patterns,klabels=||"1953-1973","1974-2004"||,key=upleft) 2
# loggp logp1973
# loggp logp1974
Note that you don't graph the original logp, but the two copies with different NA-ranges. This particular case could also be done with
Code: Select all
scatter(patterns,klabels=||"1953-1973","1974-2004"||,key=upleft) 2
# loggp logp * 1973:1
# loggp logp 1974:1 *
-
turkhanali
- Posts: 15
- Joined: Fri Jul 17, 2009 1:47 am
Re: Measuring comovement wit VAR forecast errors
Thanks for Tom Doan for your information.
I am wondering is there any fast way to come out with the similar results with multiple looping procedure. I have read the paper and text book of Hamilton I am still confused to comw up with some workable code. Anyone could help on this? Thank you in advance.
I am wondering is there any fast way to come out with the similar results with multiple looping procedure. I have read the paper and text book of Hamilton I am still confused to comw up with some workable code. Anyone could help on this? Thank you in advance.
Re: Measuring comovement wit VAR forecast errors
A modernized version of the original RATS code is now available at:
http://www.estima.com/forum/viewtopic.php?f=4&t=642
http://www.estima.com/forum/viewtopic.php?f=4&t=642