Barbara Rossi’s Stata Codes
IMPLEMENTING FORECAST INSTABILITY TESTS IN STATA, by Barbara Rossi
This webpage contains a description of Stata .ado files and corresponding help files for the Giacomini-Rossi (2010, JAE) and Rossi-Sekhposyan (2016, JAE) tests. A description of the Stata codes and output is available at: Rossi and Soupre’ (2017) )
The files (copyright by Barbara Rossi) are available at http://econpapers.repec.org/software/bocbocode/S458245.htm
Please click on the hyperlink above to download all the codes via the SSC archive.
The files are the following:
I. For the Giacomini-Rossi (2010, JAE) test:
a. giacross.ado implements the function to perform the test;
b. GR_demo.do demonstrates how to use the test (requires the file rosssekh_test_data1_new.csv);
c. giacross.sthlp contains the help function associated with the test.
d. If you use these files, I’d appreciate if you could refer to the tests using the following reference: Giacomini, R. and B. Rossi, “Forecast Comparisons in Unstable Environments”. Journal of Applied Econometrics 25(4), April 2010, 595-620.
II. For the Rossi-Sekhposyan (2016, JAE) test:
a. rosssekh.ado implements the function to perform the test;
b. RS_demo.do demonstrates how to use the test (requires the file rosssekh_test_data1_new.csv);
c. rosssekh.sthlp contains the help function associated with the test.
d. If you use these files, I’d appreciate if you could refer to the tests using the following reference: Rossi B. and T. Sekhposyan, “Forecast Rationality Tests in the Presence of Instabilities, With Applications to Federal Reserve and Survey Forecasts”. Journal of Applied Econometrics 31(3), April-May 2016, 507-532.
The easiest way to install the .ado files is to open Stata and type: ssc install forec_instab
To install these files manually, or for those who want to run the example/demo above, first download the codes directly from: http://econpapers.repec.org/software/bocbocode/S458245.htm and then:
1. Open Stata, and type: sysdir. This will list where Stata fetches its commands. The directory that matters is the "PLUS": For instance in my case, c:\ado\plus\
2. Open the PLUS directory in the file explorer, and put the ado files in the correct folders. (They are alphabetical in my case). Also add the corresponding help files (the .sthlp files)
In Stata, you should now be able to run those commands without having to load them every time.
To run a simple, illustrative example using the dataset (rosssekh_test_data1_new.csv), please check the files GR_demo.do and RS_demo.do. Make sure you open these files inside Stata selecting Window->Do_file Editor -> New Do_file Editor.
To know how the commands work, type help giacross or help rosssekh in Stata.
(Just remember that you need to work in the same directory where you saved the data! Use the command cd directoryname to navigate to the directory name in the Stata prompt)
This research has been supported by the NSF through Grants #0647627 and #1022125, the Marie Curie Fellowship program, the Spanish Ministry of Research and the ERC through Grant 615608. The author gratefully acknowledges the funding from these sources over the years.