This is an example Stata do file for CCE and CCMG estimators.
First you need to download XTCCE (from Tim Neal's website) and XTMG (from Markus Eberhardt). Note that 'Stata.zip' file includes these files.
EX6_2.do |
Explanation |
clear insheet using "ppp.csv",
comma xtset id year gen lspot = ln(spot) gen lpric = ln(cpi) gen ds = lspot - L.lspot gen dp = lpric - L.lpric xtcce ds dp, pooled xtmg ds dp, cce |
Take logs Take the first difference CCE estimator. CCMG estimator
|
Note that if you use xtcce without 'pooled' option, you will get CCMG estimation result.