Natalia Bailey, Sean Holly and M. Hashem Pesaran, "A Two Stage Approach to Spatio-Temporal Analysis with Strong
and Weak Cross-Sectional Dependence", Journal of Applied Econometrics, forthcoming.



Data Description
(Appendices I, II, III of BHP paper)

Monthly data for US house prices at Metropolitan Statistical Area (MSA) level from January 1975 to December 2010 are taken from Freddie Mac. These data are available at:
    http://www.freddiemac.com/finance/fmhpi
The quarterly figures are arithmetic averages of monthly figures.

Annual CPI data at State level are obtained from the Bureau of Labor Statistics:
    http://www.bls.gov/cpi/
The quarterly figures are interpolated using the interpolation technique described in the appendix of GVAR toolbox 1.1 user guide.

The geographical breakdown of the eight regions used in our analysis of US house price changes is based on
the Bureau of Economic Analysis classification (http://www.bea.gov/regional/docs/regions.cfm).

The calculation of distance used Latitude-Longitude of zip codes, cross referenced with each of the 366 Metropolitan Statistical Areas (MSAs). 
Any missing Latitude-Longitude coordinates were coded manually from Google searches. The geodesic distance between a pair of latitude/longitude 
coordinates was then calculated using the Haversine formula.



Variables and Estimation

File (Matlab): "BHP_main_file.m"

The data used in our study read into the main matlab file: BHP_main_file.m, section Input Data, via xlsx or csv format.

The variables used in our study and sample selection rules are implemented in
file BHP_main_file.m, section "Data prepatation (house prices and distance)". 

Estimation of residual US house prices using Cross-sectional averages (CSA) and Principal Components (PCA) approaches is implemented in
file BHP_main_file.m, section "MSA housing price regressions". Sub-procedure CS_PC_est.m is read into the main file for this purpose.

Estimation of the W matrices derived from CSA and PCA procedures and using the Multiple Testing method is implemented in
file BHP_main_file.m, section "Estimated W matrix using Multiple Testing". Sub-procedure MT.m is read into the main file for this purpose.

Construction of the distance-based W matrices is implemented in file BHP_main_file.m, section "W matrix based on geographical distance". 
Sub-procedure W_dist.m is read into the main file for this purpose.

Comparison of W matrices is implemented in file BHP_main_file.m, section "Comparison of W matrices". 
Sub-procedure W_comp.m is read into the main file for this purpose.

Section "Output of Tables 2, 3, 4 and 5 in Section 4.2.4 of BHP paper" of file BHP_main_file.m displays the contents of 
Tables 2, 3, 4, and 5 in Section 4.2.4 of the BHP paper.


File (Matlab): "BHP_hp_MLE.m"

Estimation of the heterogeneous Spatio-temporal model of US house price changes described in section 4.3 of our paper is done in file BHP_hp_MLE.m.

The data used for this purpose are saved outputs from the relevant sections in BHP_main_file.m and are read into BHP_hp_MLE.m 
in section "Input Data" via csv format.

MLE estimation of the heterogeneous spatio-temporal model is implemented in file BHP_main_file.m, section "MLE estimation - based on Aquaro, M., Bailey, N. and Pesaran, M.H. (2014). 
Quasi-Maximum Likelihood Estimation of Spatial Models with Heterogeneous Coefficients. Under preparation". Sub-procedures fn_ml_N2psi_NKbeta_Nsgm_with_selection.m is read into the main file for 
this purpose.

Section "Output of MLE estimates and significance indicators per MSA" of file BHP_hp_MLE.m displays the MLE estimates and significance indicators for
all 363 MSAs.

Section "Output of Tables 7 and 8 in Section 4.3 of BHP paper" of file BHP_hp_MLE.m displays the contents of summary Tables 7 and 8 in Section 4.3 
of the BHP paper.


File (GAUSS): "BHP_hp_alpha_CD_factors.prg"

Implementation of the CD test, estimation of the exponent of cross-sectional dependence, and determination and extraction of the Principal Components used in the 
estimation of the W matrices in file "BHP_main_file.m" are done in file BHP_hp_alpha_CD_factors.prg.

The data used for this purpose are saved outputs from the relevant sections in BHP_main_file.m and are read and classified into 
BHP_hp_alpha_CD_factors.prg in section Input Data via txt format.

The variables used in the supporting part of our study and sample selection rules are implemented in
file BHP_hp_alpha_CD_factors.prg, section "Data prepatation". Sub-procedure standx is used for this purpose (appended to the .prg file)

The CD test of Pesaran (2015) is implemented in file BHP_hp_alpha_CD_factors.prg, section "CD_test". Sub-procedure CD is used for 
this purpose (appended to the .prg file)

The Exponent of cross-sectional dependence (alpha) of Bailey, Kapetanios and Pesaran (2015) is implemented in file BHP_hp_alpha_CD_factors.prg, section "CD_test". 
Sub-procedure atildeall is used for this purpose (appended to the .prg file)

The determination of the number of Principal Components to be used in our analysis (Bai and Ng (2002)) and extraction of the strongest PCs is implemented in file BHP_hp_alpha_CD_factors.prg, 
section "Bai and Ng test for number of PCs and PCA". Sub-procedures bai and factorxx are used for this purpose (appended to the .prg file)

Section "Output" of file BHP_hp_alpha_CD_factors.prg displays the average pairwise correlations, CD and alpha estimates (with s.e.) statistics given in Section 4.1 of our paper, 
the contents of Table 1 in Section 4.1.2 of our paper, and the global and regional principal components used in the computations found
in file BHP_main_file.m.

All subprocedures are appended to the .prg file in section "Procedures".



The three main programs, supporting procedures and data files are zipped in file BHP_JAE.zip.


Please address any questions to:

Natalia Bailey
School of Economics and Finance,
Queen Mary, University of London


