/* Table 8_New_ChinaShare_Descriptive Statistics */ /* Reran Aug 1, 2012 */ /* copy industry level data on trade for China experiment */ libname public 'd:\a_data\proj\size_fun\exports\revision\wrap\public';run; ods html file="d:\a_data\proj\size_fun\exports\revision\wrap\public\Table_8_New_Chins_Share_Descriptive_statistics.html" style=minimal; data emp; set public.Mandat_naics2; if emp07=. then emp07=empcbp07; keep naics emp97 emp07; data stage1; set public.stage1_estimates_naics1997; keep naics; proc sort data=stage1; by naics; data t; merge public.tradedat_forgauss emp stage1(in=in3); by naics; instage1=in3; empgrowth=100*(emp07-emp97)/emp97; length newChinacat newWorldcat $ 10; if newChina_shr07>=.50 then newChinacat='1 >=.5 '; else if newChina_shr07>=.25 then newChinacat='2 .25-.5 '; else if newChina_shr07>=.10 then newChinacat='3 .10-.25'; else if newChina_shr07>=.05 then newChinacat='4 .05-.10'; else if newChina_shr07>0 then newChinacat='5 .001-.05'; else if newChina_shr07=0 then newChinacat='6 0'; if newworld_shr07>=.50 then newworldcat='1 >=.5 '; else if newworld_shr07>=.25 then newworldcat='2 .25-.5 '; else if newworld_shr07>=.10 then newworldcat='3 .10-.25'; else if newworld_shr07>=.05 then newworldcat='4 .05-.10'; else if newworld_shr07>0 then newworldcat='5 .001-.05'; else if newworld_shr07=0 then newworldcat='6 0'; proc corr data=t; var newChina_shr07 newworld_shr07; title 'proc corr'; proc freq data=t; tables newChinacat*newWorldcat; title 'proc freq'; proc tabulate data=t; class newChinacat; var newChina_shr07 newworld_shr07 empgrowth; table all newChinacat, N*f=7.0 mean*(newChina_shr07 newworld_shr07 empgrowth); title 'proc tab all 473 industries'; proc tabulate data=t; where instage1; class newChinacat; var newChina_shr07 newworld_shr07 empgrowth; table all newChinacat, N*f=7.0 mean*(newChina_shr07 newworld_shr07) mean*empgrowth*f=7.1; title 'Table 8: proc tab 466 stage1 industries'; proc sort data=t; by descending newChina_shr07; proc print data=t; var naics naicstext newChina_shr07 newworld_shr07 empgrowth instage1; title 'proc print'; run; ods html close; run;