*********************
Description: This set of Matlab programs produces the Reis-Watson estimates for "pure inflation" for the Eurozone and the United States 1996-2015. They are adapted versions of the original codes by Reis and Watson in Gauss used in their original AEJ:macro 2010 paper
Date: April 2017
Authors: Chao He and Ricardo Reis


**********************
There are two folders: data and code.

In the data folder:
The raw datas are in the folder NewRaw. "..\code\dataPrep.m" process these raw datas are generate datasets:
-- tableExtractedDataEU.xls
-- tableExtractedDataUS4CPI.xls
-- tableExtractedDataUS6CPI.xls 
the HCIP and CPI are in HCIPEU.xls and CPIUS.xls respectively.

In the code folder:
-- Main.m adapts npi_em_4.gss. It solves the models with unit factor loading constraint model. The linear latent variable model is estimated using an EM algorithm with the E-step computed by Kalman smoothing and the M-step by linear regression. 

To run different exercises, just specify different number at line 30: {'EUdata','USCPIData4','USCPIData6'} datasets respectively.

line 40-92 are kalman filter related specifications for each cases.

line 388-429 are figure related specifications for each cases.

figure3.m adapts figure3.gss. It plots the decomposition of inflation. 

The other *.m files are the relevant precedures converted the *.prc or *.gss.

The figure subfolder stores the final output. 

The workspace subfolder stores workspace from main.m, which is to be used by the figure.m.