version 8 // tells Stata which version program was created in log close log using gdptemp.log, replace // creates or overwrites output file gdptemp.smcl in ascii format // This file tests effects of applying correction for clustered std errors in Table 4 results // and using ABS(Lat) rather than COS(ABS(Lat)) // // 8 versions are run: 2 runs ("GLS") replicate the results in Table 4 (STREND, GTREND) // 2 runs ("CLUSTER") add an adjustment for country clustering of std errors // Then repeated replacing COSABLAT with ABSLAT // // Note STATA GLS model slightly different from Shazam. Betas are the same, t-stats a little different // // clear set memory 50m insheet using table4.csv // clears data then reads data from table4.csv mvdecode _all, mv(-99) // changes missing value code from -99 to '.' tabulate country, generate(country) // generates city dummy variables sum(_all) // descriptive statistics * * GLS model - STREND (TABLE 4 COLUMN 1) * regress strend press water cosablat pop scale79 coal80 coalgrow inc79 gdpgrow soviet surfmiss lit79 , robust display e(ll) est store strendGLS test pop scale79 coal80 coalgrow inc79 gdpgrow // P(ECON=0) test surfmiss lit79 // P(SOC=0) test pop scale79 coal80 coalgrow inc79 gdpgrow surfmiss lit79 soviet //P(ECON=SOC=SOV=0) * CLUSTER model - STREND * regress strend press water cosablat pop scale79 coal80 coalgrow inc79 gdpgrow soviet surfmiss lit79 , robust cluster(country) display e(ll) est store strCLUSTR test pop scale79 coal80 coalgrow inc79 gdpgrow // P(ECON=0) test surfmiss lit79 // P(SOC=0) test pop scale79 coal80 coalgrow inc79 gdpgrow surfmiss lit79 soviet //P(ECON=SOC=SOV=0) * GLS model - GTREND (TABLE 4 COLUMN 2) * regress gtrend press water cosablat pop scale79 coal80 coalgrow inc79 gdpgrow soviet gamiss lit79 , robust display e(ll) est store gtrendGLS test pop scale79 coal80 coalgrow inc79 gdpgrow // P(ECON=0) test gamiss lit79 // P(SOC=0) test pop scale79 coal80 coalgrow inc79 gdpgrow gamiss lit79 soviet //P(ECON=SOC=SOV=0) * CLUSTER model - GTREND * regress gtrend press water cosablat pop scale79 coal80 coalgrow inc79 gdpgrow soviet gamiss lit79 , robust cluster(country) display e(ll) est store gtrCLUSTR test pop scale79 coal80 coalgrow inc79 gdpgrow // P(ECON=0) test gamiss lit79 // P(SOC=0) test pop scale79 coal80 coalgrow inc79 gdpgrow gamiss lit79 soviet //P(ECON=SOC=SOV=0) ****************************** MAKE RESULTS TABLE - COSABLAT********************************************* est table strendGLS strCLUSTR gtrendGLS gtrCLUSTR, t(%5.2f) b(%7.3f) stfmt(%9.2f) stats(N r2 ll bic) // // NOW RE-DO EVERYTHING WITH ABSLAT RATHER THAN COSABLAT // (LAT IN DEGREES - A TRANFORM TO RADIANS WOULD NOT AFFECT ANYTHING HERE) // * GLS model - STREND * regress strend press water abslat pop scale79 coal80 coalgrow inc79 gdpgrow soviet surfmiss lit79 , robust display e(ll) est store strendGLS test pop scale79 coal80 coalgrow inc79 gdpgrow // P(ECON=0) test surfmiss lit79 // P(SOC=0) test pop scale79 coal80 coalgrow inc79 gdpgrow surfmiss lit79 soviet //P(ECON=SOC=SOV=0) * CLUSTER model - STREND * regress strend press water abslat pop scale79 coal80 coalgrow inc79 gdpgrow soviet surfmiss lit79 , robust cluster(country) display e(ll) est store strCLUSTR test pop scale79 coal80 coalgrow inc79 gdpgrow // P(ECON=0) test surfmiss lit79 // P(SOC=0) test pop scale79 coal80 coalgrow inc79 gdpgrow surfmiss lit79 soviet //P(ECON=SOC=SOV=0) * GLS model - GTREND * regress gtrend press water abslat pop scale79 coal80 coalgrow inc79 gdpgrow soviet gamiss lit79 , robust display e(ll) est store gtrendGLS test pop scale79 coal80 coalgrow inc79 gdpgrow // P(ECON=0) test gamiss lit79 // P(SOC=0) test pop scale79 coal80 coalgrow inc79 gdpgrow gamiss lit79 soviet //P(ECON=SOC=SOV=0) * CLUSTER model - GTREND * regress gtrend press water abslat pop scale79 coal80 coalgrow inc79 gdpgrow soviet gamiss lit79 , robust cluster(country) display e(ll) est store gtrCLUSTR test pop scale79 coal80 coalgrow inc79 gdpgrow // P(ECON=0) test gamiss lit79 // P(SOC=0) test pop scale79 coal80 coalgrow inc79 gdpgrow gamiss lit79 soviet //P(ECON=SOC=SOV=0) ****************************** MAKE RESULTS TABLE - ABSLAT ********************************************* est table strendGLS strCLUSTR gtrendGLS gtrCLUSTR, t(%5.2f) b(%7.3f) stfmt(%9.2f) stats(N r2 ll bic)