/* Table10_data_statistic_high_concentration.sas */ 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\Table10_data_statistic_high_concentration.html" style=minimal; run; data loc_level97; set public.ea_cm97; s=snorm_LM/snormUS_LM; *estimated share of sales; LQsal97=s/(pop97/pop97_US); LQest97=(est_LM/estUS_LM)/(pop97/pop97_US); if est_LM>0 then LQsize97=(s/est_LM)/(1/estUS_LM); data loc_level07; set public.ea_cbp07; est07=est_cbp; est07_US=estUS_cbp; keep naicsindex ea_index est07 est07_US; data loc_level; merge loc_level97 loc_level07; by naicsindex ea_index; LQest07=(est07/est07_US)/(pop97/pop97_US); perdif_count_share=100*((est07/est07_US)-(est_LM/estUS_LM))/(est_LM/estUS_LM); data tradedat; set public.tradedat_forgauss; length newChinacat $ 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'; keep naics newChinacat; *Use only the industries for which we have model estimates; data list; set public.Stage1_estimates_naics1997; keep naics; data loc_level; merge loc_level tradedat list(in=in3); by naics; if in3; *look at high concentration locations only; data t; set loc_level; if s>=.05; *require primary location to have at least 5 percenet of sale; if LQsal97>=2; proc tabulate data=t; var LQsize97 LQest97 LQest07 perdif_count_share; class newChinacat; table all newChinacat, N*f=7.0 mean*(LQsize97 LQest97 LQest07)*f=7.1 perdif_count_share*mean*f=7.0; title 'Select s>=.05 and LQsal97>=2'; run; ods html close; run;