* Tables for centrality paper clear set more off use Index_allMSAs.dta, clear *Table 1 - Pair-Wise correlation pwcorr index*, obs spearman index*, pw stats(rho obs) *Table 2 - Factor analysis factor index520 index1120 index2160 index5120 index6160 index6280 index8840 gen auxi=index520+ index1120+index2160+index5120+index6160+index6280+index8840 friedman index520 index1120 index2160 index5120 index6160 index6280 index8840 if auxi~=. rename index1120 Boston rename index5120 Minneapolis scatter Boston Minneapolis *Table 3 - Centrality by major occupation categories use Index_allMSAs.dta, clear gen soc=substr(occsoc,1,2) collapse index* (sd) sdindex=index, by(soc) foreach i in 520 1120 2160 5120 6160 6280 8840 { gsort -index`i' gen rank`i'=_n } gsort -index gen rank=_n list rank soc index sdindex index520 index1120 index2160 index5120 index6160 index6280 index8840 browse rank soc index sdindex index520 index1120 index2160 index5120 index6160 index6280 index8840