clear set more off log using test_trade_markets.log, replace * Keynote AFiD-Workshop 2017 * Deskriptive Auswertungen fuer alle Exporte und Importe im FDZ Destatis * Stand: 12. September 2016 * ############################ Exporte #################################### use ah_2009bis2012_2711_exporte_sf.dta * Unternehmensnummer: id * Jahresangabe (neu: jahr) und Angabe zur Guetersystematik (neu: HS6) numerisch destring Jahr, replace rename Jahr jahr destring Systematik, replace rename Systematik HS6 * Angabe zu Partnerland - neu: land rename BLD_ULD land * Angabe zum Monat der Transaktionen (neu: monat) numerisch destring Monat, replace rename Monat monat * Ausschluss von Transaktionen mit fehlenden Angaben drop if id == . drop if euro == . | euro == 0 * drop if kg == . | kg == 0 drop if HS6 == . | HS6 == 0 drop if land == "" * HS2-Sektionen bilden generate HS2 = int(HS6 / 10000) generate HS2section = . replace HS2section = 1 if HS2 >= 1 & HS2 <= 5 replace HS2section = 2 if HS2 >= 6 & HS2 <= 14 replace HS2section = 3 if HS2 == 15 replace HS2section = 4 if HS2 >= 16 & HS2 <= 24 replace HS2section = 5 if HS2 >= 25 & HS2 <= 27 replace HS2section = 6 if HS2 >= 28 & HS2 <= 38 replace HS2section = 7 if HS2 >= 39 & HS2 <= 40 replace HS2section = 8 if HS2 >= 41 & HS2 <= 43 replace HS2section = 9 if HS2 >= 44 & HS2 <= 46 replace HS2section = 10 if HS2 >= 47 & HS2 <= 49 replace HS2section = 11 if HS2 >= 50 & HS2 <= 63 replace HS2section = 12 if HS2 >= 64 & HS2 <= 67 replace HS2section = 13 if HS2 >= 68 & HS2 <= 70 replace HS2section = 14 if HS2 == 71 replace HS2section = 15 if HS2 >= 72 & HS2 <= 83 replace HS2section = 16 if HS2 >= 84 & HS2 <= 85 replace HS2section = 17 if HS2 >= 86 & HS2 <= 89 replace HS2section = 18 if HS2 >= 90 & HS2 <= 92 replace HS2section = 19 if HS2 == 93 replace HS2section = 20 if HS2 >= 94 & HS2 <= 96 replace HS2section = 21 if HS2 >= 97 & HS2 <= 99 * Ersetzen der Laendercodes durch numerische Codes generate country = . replace country = 1 if land == "AF" replace country = 2 if land == "AX" replace country = 3 if land == "AL" replace country = 4 if land == "DZ" replace country = 5 if land == "AS" replace country = 6 if land == "AD" replace country = 7 if land == "AO" replace country = 8 if land == "AI" replace country = 9 if land == "AQ" replace country = 10 if land == "AG" replace country = 11 if land == "AR" replace country = 12 if land == "AM" replace country = 13 if land == "AW" replace country = 14 if land == "AU" replace country = 15 if land == "AT" replace country = 16 if land == "AZ" replace country = 17 if land == "BS" replace country = 18 if land == "BH" replace country = 19 if land == "BD" replace country = 20 if land == "BB" replace country = 21 if land == "BY" replace country = 22 if land == "BE" replace country = 23 if land == "BZ" replace country = 24 if land == "BJ" replace country = 25 if land == "BM" replace country = 26 if land == "BT" replace country = 27 if land == "BO" replace country = 28 if land == "BA" replace country = 29 if land == "BW" replace country = 30 if land == "BV" replace country = 31 if land == "BR" replace country = 32 if land == "IO" replace country = 33 if land == "BN" replace country = 34 if land == "BG" replace country = 35 if land == "BF" replace country = 36 if land == "BI" replace country = 37 if land == "KH" replace country = 38 if land == "CM" replace country = 39 if land == "CA" replace country = 40 if land == "CV" replace country = 41 if land == "KY" replace country = 42 if land == "CF" replace country = 43 if land == "TD" replace country = 44 if land == "CL" replace country = 45 if land == "CN" replace country = 46 if land == "CX" replace country = 47 if land == "CC" replace country = 48 if land == "CO" replace country = 49 if land == "KM" replace country = 50 if land == "CG" replace country = 51 if land == "CD" replace country = 52 if land == "CK" replace country = 53 if land == "CR" replace country = 54 if land == "CI" replace country = 55 if land == "HR" replace country = 56 if land == "CU" replace country = 57 if land == "CY" replace country = 58 if land == "CZ" replace country = 59 if land == "DK" replace country = 60 if land == "DJ" replace country = 61 if land == "DM" replace country = 62 if land == "DO" replace country = 63 if land == "EC" replace country = 64 if land == "EG" replace country = 65 if land == "SV" replace country = 66 if land == "GQ" replace country = 67 if land == "ER" replace country = 68 if land == "EE" replace country = 69 if land == "ET" replace country = 70 if land == "FK" replace country = 71 if land == "FO" replace country = 72 if land == "FJ" replace country = 73 if land == "FI" replace country = 74 if land == "FR" replace country = 75 if land == "GF" replace country = 76 if land == "PF" replace country = 77 if land == "TF" replace country = 78 if land == "GA" replace country = 79 if land == "GM" replace country = 80 if land == "GE" replace country = 81 if land == "DE" replace country = 82 if land == "GH" replace country = 83 if land == "GI" replace country = 84 if land == "GR" replace country = 85 if land == "GL" replace country = 86 if land == "GD" replace country = 87 if land == "GP" replace country = 88 if land == "GU" replace country = 89 if land == "GT" replace country = 90 if land == "GG" replace country = 91 if land == "GN" replace country = 92 if land == "GW" replace country = 93 if land == "GY" replace country = 94 if land == "HT" replace country = 95 if land == "HM" replace country = 96 if land == "VA" replace country = 97 if land == "HN" replace country = 98 if land == "HK" replace country = 99 if land == "HU" replace country = 100 if land == "IS" replace country = 101 if land == "IN" replace country = 102 if land == "ID" replace country = 103 if land == "IR" replace country = 104 if land == "IQ" replace country = 105 if land == "IE" replace country = 106 if land == "IM" replace country = 107 if land == "IL" replace country = 108 if land == "IT" replace country = 109 if land == "JM" replace country = 110 if land == "JP" replace country = 111 if land == "JE" replace country = 112 if land == "JO" replace country = 113 if land == "KZ" replace country = 114 if land == "KE" replace country = 115 if land == "KI" replace country = 116 if land == "KP" replace country = 117 if land == "KR" replace country = 118 if land == "KW" replace country = 119 if land == "KG" replace country = 120 if land == "LA" replace country = 121 if land == "LV" replace country = 122 if land == "LB" replace country = 123 if land == "LS" replace country = 124 if land == "LR" replace country = 125 if land == "LY" replace country = 126 if land == "LI" replace country = 127 if land == "LT" replace country = 128 if land == "LU" replace country = 129 if land == "MO" replace country = 130 if land == "MK" replace country = 131 if land == "MG" replace country = 132 if land == "MW" replace country = 133 if land == "MY" replace country = 134 if land == "MV" replace country = 135 if land == "ML" replace country = 136 if land == "MT" replace country = 137 if land == "MH" replace country = 138 if land == "MQ" replace country = 139 if land == "MR" replace country = 140 if land == "MU" replace country = 141 if land == "YT" replace country = 142 if land == "MX" replace country = 143 if land == "FM" replace country = 144 if land == "MD" replace country = 145 if land == "MC" replace country = 146 if land == "MN" replace country = 147 if land == "ME" replace country = 148 if land == "MS" replace country = 149 if land == "MA" replace country = 150 if land == "MZ" replace country = 151 if land == "MM" replace country = 152 if land == "NA" replace country = 153 if land == "NR" replace country = 154 if land == "NP" replace country = 155 if land == "NL" replace country = 156 if land == "AN" replace country = 157 if land == "NC" replace country = 158 if land == "NZ" replace country = 159 if land == "NI" replace country = 160 if land == "NE" replace country = 161 if land == "NG" replace country = 162 if land == "NU" replace country = 163 if land == "NF" replace country = 164 if land == "MP" replace country = 165 if land == "NO" replace country = 166 if land == "OM" replace country = 167 if land == "PK" replace country = 168 if land == "PW" replace country = 169 if land == "PS" replace country = 170 if land == "PA" replace country = 171 if land == "PG" replace country = 172 if land == "PY" replace country = 173 if land == "PE" replace country = 174 if land == "PH" replace country = 175 if land == "PN" replace country = 176 if land == "PL" replace country = 177 if land == "PT" replace country = 178 if land == "PR" replace country = 179 if land == "QA" replace country = 180 if land == "RE" replace country = 181 if land == "RO" replace country = 182 if land == "RU" replace country = 183 if land == "RW" replace country = 184 if land == "BL" replace country = 185 if land == "SH" replace country = 186 if land == "KN" replace country = 187 if land == "LC" replace country = 188 if land == "MF" replace country = 189 if land == "PM" replace country = 190 if land == "VC" replace country = 191 if land == "WS" replace country = 192 if land == "SM" replace country = 193 if land == "ST" replace country = 194 if land == "SA" replace country = 195 if land == "SN" replace country = 196 if land == "RS" replace country = 197 if land == "SC" replace country = 198 if land == "SL" replace country = 199 if land == "SG" replace country = 200 if land == "SK" replace country = 201 if land == "SI" replace country = 202 if land == "SB" replace country = 203 if land == "SO" replace country = 204 if land == "ZA" replace country = 205 if land == "GS" replace country = 206 if land == "ES" replace country = 207 if land == "LK" replace country = 208 if land == "SD" replace country = 209 if land == "SR" replace country = 210 if land == "SJ" replace country = 211 if land == "SZ" replace country = 212 if land == "SE" replace country = 213 if land == "CH" replace country = 214 if land == "SY" replace country = 215 if land == "TW" replace country = 216 if land == "TJ" replace country = 217 if land == "TZ" replace country = 218 if land == "TH" replace country = 219 if land == "TL" replace country = 220 if land == "TG" replace country = 221 if land == "TK" replace country = 222 if land == "TO" replace country = 223 if land == "TT" replace country = 224 if land == "TN" replace country = 225 if land == "TR" replace country = 226 if land == "TM" replace country = 227 if land == "TC" replace country = 228 if land == "TV" replace country = 229 if land == "UG" replace country = 230 if land == "UA" replace country = 231 if land == "AE" replace country = 232 if land == "GB" replace country = 233 if land == "US" replace country = 234 if land == "UM" replace country = 235 if land == "UY" replace country = 236 if land == "UZ" replace country = 237 if land == "VU" replace country = 238 if land == "VE" replace country = 239 if land == "VN" replace country = 240 if land == "VG" replace country = 241 if land == "VI" replace country = 242 if land == "WF" replace country = 243 if land == "EH" replace country = 244 if land == "YE" replace country = 245 if land == "ZM" replace country = 246 if land == "ZW" replace country = 247 if land == "WW" replace country = 248 if land == "YY" replace country = 249 if land == "??" replace country = 250 if land == "ZZ" tabstat id jahr monat HS6 HS2 HS2section euro kg country, statistics(n mean sd p1 p50 p99) * ############################################################################## * 2009 preserve keep if jahr == 2009 * Wert aller Transaktionen pro Unternehmen (in Millionen Euro) replace euro = euro / 1000000 sort id by id: egen summe_handel_id = sum(euro) duplicates drop id, force tabstat summe_handel_id, statistics(n mean sd p1 p50 p99) * Wert aller Transaktionen insgesamt (in Millionen Euro) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Sortieren aufsteigend nach Wert aller Transaktionen pro Unternehmen gsort - summe_handel_id * Anteil der 3/10/50/100 groessten Haendler-Unternehmen am Gesamthandel egen tradesum_3 = sum(summe_handel_id) in 1/3 generate share_3 = tradesum_3 / summe_handel_total * 100 tabstat share_3, statistics(n mean sd) egen tradesum_10 = sum(summe_handel_id) in 1/10 generate share_10 = tradesum_10 / summe_handel_total * 100 tabstat share_10, statistics(n mean sd) egen tradesum_50 = sum(summe_handel_id) in 1/50 generate share_50 = tradesum_50 / summe_handel_total * 100 tabstat share_50, statistics(n mean sd) egen tradesum_100 = sum(summe_handel_id) in 1/100 generate share_100 = tradesum_100 / summe_handel_total * 100 tabstat share_100, statistics(n mean sd) keep id summe_handel_id save part1.dta, replace restore preserve keep if jahr == 2009 sort id HS6 land duplicates drop id HS6 land, force egen market = group(id HS6 land) sort id HS6 land by id: egen numbermarkets_id = count(market) duplicates drop id, force keep id numbermarkets_id save part2.dta, replace restore preserve clear use part1.dta merge 1:1 id using part2.dta keep if _merge == 3 tabstat summe_handel_id numbermarkets_id, statistics(n mean sd p1 p50 p99) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Anzahl Maerkte fuer Top 3/10/50/100 Handelsunternehmen gsort - summe_handel_id egen summarkets_3 = sum(numbermarkets_id) in 1/3 generate averagemarkets_3 = summarkets_3 / 3 tabstat averagemarkets_3, statistics(n mean sd) egen summarkets_10 = sum(numbermarkets_id) in 1/10 generate averagemarkets_10 = summarkets_10 / 10 tabstat averagemarkets_10, statistics(n mean sd) egen summarkets_50 = sum(numbermarkets_id) in 1/50 generate averagemarkets_50 = summarkets_50 / 50 tabstat averagemarkets_50, statistics(n mean sd) egen summarkets_100 = sum(numbermarkets_id) in 1/100 generate averagemarkets_100 = summarkets_100 / 100 tabstat averagemarkets_100, statistics(n mean sd) * Anteil am Gesamtmarkt fuer Unternehmen mit Top 3/10/50/100 Maerkten generate anteil_gesamt = summe_handel_id / summe_handel_total * 100 gsort - numbermarkets_id egen anteilmarkt_3 = sum(anteil_gesamt) in 1/3 tabstat anteilmarkt_3, statistics(n mean sd) egen anteilmarkt_10 = sum(anteil_gesamt) in 1/10 tabstat anteilmarkt_10, statistics(n mean sd) egen anteilmarkt_50 = sum(anteil_gesamt) in 1/50 tabstat anteilmarkt_50, statistics(n mean sd) egen anteilmarkt_100 = sum(anteil_gesamt) in 1/100 tabstat anteilmarkt_100, statistics(n mean sd) restore * 2010 preserve keep if jahr == 2010 * Wert aller Transaktionen pro Unternehmen (in Millionen Euro) replace euro = euro / 1000000 sort id by id: egen summe_handel_id = sum(euro) duplicates drop id, force tabstat summe_handel_id, statistics(n mean sd p1 p50 p99) * Wert aller Transaktionen insgesamt (in Millionen Euro) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Sortieren aufsteigend nach Wert aller Transaktionen pro Unternehmen gsort - summe_handel_id * Anteil der 3/10/50/100 groessten Haendler-Unternehmen am Gesamthandel egen tradesum_3 = sum(summe_handel_id) in 1/3 generate share_3 = tradesum_3 / summe_handel_total * 100 tabstat share_3, statistics(n mean sd) egen tradesum_10 = sum(summe_handel_id) in 1/10 generate share_10 = tradesum_10 / summe_handel_total * 100 tabstat share_10, statistics(n mean sd) egen tradesum_50 = sum(summe_handel_id) in 1/50 generate share_50 = tradesum_50 / summe_handel_total * 100 tabstat share_50, statistics(n mean sd) egen tradesum_100 = sum(summe_handel_id) in 1/100 generate share_100 = tradesum_100 / summe_handel_total * 100 tabstat share_100, statistics(n mean sd) keep id summe_handel_id save part1.dta, replace restore preserve keep if jahr == 2010 sort id HS6 land duplicates drop id HS6 land, force egen market = group(id HS6 land) sort id HS6 land by id: egen numbermarkets_id = count(market) duplicates drop id, force keep id numbermarkets_id save part2.dta, replace restore preserve clear use part1.dta merge 1:1 id using part2.dta keep if _merge == 3 tabstat summe_handel_id numbermarkets_id, statistics(n mean sd p1 p50 p99) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Anzahl Maerkte fuer Top 3/10/50/100 Handelsunternehmen gsort - summe_handel_id egen summarkets_3 = sum(numbermarkets_id) in 1/3 generate averagemarkets_3 = summarkets_3 / 3 tabstat averagemarkets_3, statistics(n mean sd) egen summarkets_10 = sum(numbermarkets_id) in 1/10 generate averagemarkets_10 = summarkets_10 / 10 tabstat averagemarkets_10, statistics(n mean sd) egen summarkets_50 = sum(numbermarkets_id) in 1/50 generate averagemarkets_50 = summarkets_50 / 50 tabstat averagemarkets_50, statistics(n mean sd) egen summarkets_100 = sum(numbermarkets_id) in 1/100 generate averagemarkets_100 = summarkets_100 / 100 tabstat averagemarkets_100, statistics(n mean sd) * Anteil am Gesamtmarkt fuer Unternehmen mit Top 3/10/50/100 Maerkten generate anteil_gesamt = summe_handel_id / summe_handel_total * 100 gsort - numbermarkets_id egen anteilmarkt_3 = sum(anteil_gesamt) in 1/3 tabstat anteilmarkt_3, statistics(n mean sd) egen anteilmarkt_10 = sum(anteil_gesamt) in 1/10 tabstat anteilmarkt_10, statistics(n mean sd) egen anteilmarkt_50 = sum(anteil_gesamt) in 1/50 tabstat anteilmarkt_50, statistics(n mean sd) egen anteilmarkt_100 = sum(anteil_gesamt) in 1/100 tabstat anteilmarkt_100, statistics(n mean sd) restore * 2011 preserve keep if jahr == 2011 * Wert aller Transaktionen pro Unternehmen (in Millionen Euro) replace euro = euro / 1000000 sort id by id: egen summe_handel_id = sum(euro) duplicates drop id, force tabstat summe_handel_id, statistics(n mean sd p1 p50 p99) * Wert aller Transaktionen insgesamt (in Millionen Euro) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Sortieren aufsteigend nach Wert aller Transaktionen pro Unternehmen gsort - summe_handel_id * Anteil der 3/10/50/100 groessten Haendler-Unternehmen am Gesamthandel egen tradesum_3 = sum(summe_handel_id) in 1/3 generate share_3 = tradesum_3 / summe_handel_total * 100 tabstat share_3, statistics(n mean sd) egen tradesum_10 = sum(summe_handel_id) in 1/10 generate share_10 = tradesum_10 / summe_handel_total * 100 tabstat share_10, statistics(n mean sd) egen tradesum_50 = sum(summe_handel_id) in 1/50 generate share_50 = tradesum_50 / summe_handel_total * 100 tabstat share_50, statistics(n mean sd) egen tradesum_100 = sum(summe_handel_id) in 1/100 generate share_100 = tradesum_100 / summe_handel_total * 100 tabstat share_100, statistics(n mean sd) keep id summe_handel_id save part1.dta, replace restore preserve keep if jahr == 2011 sort id HS6 land duplicates drop id HS6 land, force egen market = group(id HS6 land) sort id HS6 land by id: egen numbermarkets_id = count(market) duplicates drop id, force keep id numbermarkets_id save part2.dta, replace restore preserve clear use part1.dta merge 1:1 id using part2.dta keep if _merge == 3 tabstat summe_handel_id numbermarkets_id, statistics(n mean sd p1 p50 p99) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Anzahl Maerkte fuer Top 3/10/50/100 Handelsunternehmen gsort - summe_handel_id egen summarkets_3 = sum(numbermarkets_id) in 1/3 generate averagemarkets_3 = summarkets_3 / 3 tabstat averagemarkets_3, statistics(n mean sd) egen summarkets_10 = sum(numbermarkets_id) in 1/10 generate averagemarkets_10 = summarkets_10 / 10 tabstat averagemarkets_10, statistics(n mean sd) egen summarkets_50 = sum(numbermarkets_id) in 1/50 generate averagemarkets_50 = summarkets_50 / 50 tabstat averagemarkets_50, statistics(n mean sd) egen summarkets_100 = sum(numbermarkets_id) in 1/100 generate averagemarkets_100 = summarkets_100 / 100 tabstat averagemarkets_100, statistics(n mean sd) * Anteil am Gesamtmarkt fuer Unternehmen mit Top 3/10/50/100 Maerkten generate anteil_gesamt = summe_handel_id / summe_handel_total * 100 gsort - numbermarkets_id egen anteilmarkt_3 = sum(anteil_gesamt) in 1/3 tabstat anteilmarkt_3, statistics(n mean sd) egen anteilmarkt_10 = sum(anteil_gesamt) in 1/10 tabstat anteilmarkt_10, statistics(n mean sd) egen anteilmarkt_50 = sum(anteil_gesamt) in 1/50 tabstat anteilmarkt_50, statistics(n mean sd) egen anteilmarkt_100 = sum(anteil_gesamt) in 1/100 tabstat anteilmarkt_100, statistics(n mean sd) restore * 2012 preserve keep if jahr == 2012 * Wert aller Transaktionen pro Unternehmen (in Millionen Euro) replace euro = euro / 1000000 sort id by id: egen summe_handel_id = sum(euro) duplicates drop id, force tabstat summe_handel_id, statistics(n mean sd p1 p50 p99) * Wert aller Transaktionen insgesamt (in Millionen Euro) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Sortieren aufsteigend nach Wert aller Transaktionen pro Unternehmen gsort - summe_handel_id * Anteil der 3/10/50/100 groessten Haendler-Unternehmen am Gesamthandel egen tradesum_3 = sum(summe_handel_id) in 1/3 generate share_3 = tradesum_3 / summe_handel_total * 100 tabstat share_3, statistics(n mean sd) egen tradesum_10 = sum(summe_handel_id) in 1/10 generate share_10 = tradesum_10 / summe_handel_total * 100 tabstat share_10, statistics(n mean sd) egen tradesum_50 = sum(summe_handel_id) in 1/50 generate share_50 = tradesum_50 / summe_handel_total * 100 tabstat share_50, statistics(n mean sd) egen tradesum_100 = sum(summe_handel_id) in 1/100 generate share_100 = tradesum_100 / summe_handel_total * 100 tabstat share_100, statistics(n mean sd) keep id summe_handel_id save part1.dta, replace restore preserve keep if jahr == 2012 sort id HS6 land duplicates drop id HS6 land, force egen market = group(id HS6 land) sort id HS6 land by id: egen numbermarkets_id = count(market) duplicates drop id, force keep id numbermarkets_id save part2.dta, replace restore preserve clear use part1.dta merge 1:1 id using part2.dta keep if _merge == 3 tabstat summe_handel_id numbermarkets_id, statistics(n mean sd p1 p50 p99) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Anzahl Maerkte fuer Top 3/10/50/100 Handelsunternehmen gsort - summe_handel_id egen summarkets_3 = sum(numbermarkets_id) in 1/3 generate averagemarkets_3 = summarkets_3 / 3 tabstat averagemarkets_3, statistics(n mean sd) egen summarkets_10 = sum(numbermarkets_id) in 1/10 generate averagemarkets_10 = summarkets_10 / 10 tabstat averagemarkets_10, statistics(n mean sd) egen summarkets_50 = sum(numbermarkets_id) in 1/50 generate averagemarkets_50 = summarkets_50 / 50 tabstat averagemarkets_50, statistics(n mean sd) egen summarkets_100 = sum(numbermarkets_id) in 1/100 generate averagemarkets_100 = summarkets_100 / 100 tabstat averagemarkets_100, statistics(n mean sd) * Anteil am Gesamtmarkt fuer Unternehmen mit Top 3/10/50/100 Maerkten generate anteil_gesamt = summe_handel_id / summe_handel_total * 100 gsort - numbermarkets_id egen anteilmarkt_3 = sum(anteil_gesamt) in 1/3 tabstat anteilmarkt_3, statistics(n mean sd) egen anteilmarkt_10 = sum(anteil_gesamt) in 1/10 tabstat anteilmarkt_10, statistics(n mean sd) egen anteilmarkt_50 = sum(anteil_gesamt) in 1/50 tabstat anteilmarkt_50, statistics(n mean sd) egen anteilmarkt_100 = sum(anteil_gesamt) in 1/100 tabstat anteilmarkt_100, statistics(n mean sd) restore clear * ######################## Importe #################################### use ah_2009bis2012_2711_importe_sf.dta * Unternehmensnummer: id * Jahresangabe (neu: jahr) und Angabe zur Guetersystematik (neu: HS6) numerisch destring Jahr, replace rename Jahr jahr destring Systematik, replace rename Systematik HS6 * Angabe zu Partnerland - neu: land rename BLD_ULD land * Angabe zum Monat der Transaktionen (neu: monat) numerisch destring Monat, replace rename Monat monat * Ausschluss von Transaktionen mit fehlenden Angaben drop if id == . drop if euro == . | euro == 0 * drop if kg == . | kg == 0 drop if HS6 == . | HS6 == 0 drop if land == "" * HS2-Sektionen bilden generate HS2 = int(HS6 / 10000) generate HS2section = . replace HS2section = 1 if HS2 >= 1 & HS2 <= 5 replace HS2section = 2 if HS2 >= 6 & HS2 <= 14 replace HS2section = 3 if HS2 == 15 replace HS2section = 4 if HS2 >= 16 & HS2 <= 24 replace HS2section = 5 if HS2 >= 25 & HS2 <= 27 replace HS2section = 6 if HS2 >= 28 & HS2 <= 38 replace HS2section = 7 if HS2 >= 39 & HS2 <= 40 replace HS2section = 8 if HS2 >= 41 & HS2 <= 43 replace HS2section = 9 if HS2 >= 44 & HS2 <= 46 replace HS2section = 10 if HS2 >= 47 & HS2 <= 49 replace HS2section = 11 if HS2 >= 50 & HS2 <= 63 replace HS2section = 12 if HS2 >= 64 & HS2 <= 67 replace HS2section = 13 if HS2 >= 68 & HS2 <= 70 replace HS2section = 14 if HS2 == 71 replace HS2section = 15 if HS2 >= 72 & HS2 <= 83 replace HS2section = 16 if HS2 >= 84 & HS2 <= 85 replace HS2section = 17 if HS2 >= 86 & HS2 <= 89 replace HS2section = 18 if HS2 >= 90 & HS2 <= 92 replace HS2section = 19 if HS2 == 93 replace HS2section = 20 if HS2 >= 94 & HS2 <= 96 replace HS2section = 21 if HS2 >= 97 & HS2 <= 99 * Ersetzen der Laendercodes durch numerische Codes generate country = . replace country = 1 if land == "AF" replace country = 2 if land == "AX" replace country = 3 if land == "AL" replace country = 4 if land == "DZ" replace country = 5 if land == "AS" replace country = 6 if land == "AD" replace country = 7 if land == "AO" replace country = 8 if land == "AI" replace country = 9 if land == "AQ" replace country = 10 if land == "AG" replace country = 11 if land == "AR" replace country = 12 if land == "AM" replace country = 13 if land == "AW" replace country = 14 if land == "AU" replace country = 15 if land == "AT" replace country = 16 if land == "AZ" replace country = 17 if land == "BS" replace country = 18 if land == "BH" replace country = 19 if land == "BD" replace country = 20 if land == "BB" replace country = 21 if land == "BY" replace country = 22 if land == "BE" replace country = 23 if land == "BZ" replace country = 24 if land == "BJ" replace country = 25 if land == "BM" replace country = 26 if land == "BT" replace country = 27 if land == "BO" replace country = 28 if land == "BA" replace country = 29 if land == "BW" replace country = 30 if land == "BV" replace country = 31 if land == "BR" replace country = 32 if land == "IO" replace country = 33 if land == "BN" replace country = 34 if land == "BG" replace country = 35 if land == "BF" replace country = 36 if land == "BI" replace country = 37 if land == "KH" replace country = 38 if land == "CM" replace country = 39 if land == "CA" replace country = 40 if land == "CV" replace country = 41 if land == "KY" replace country = 42 if land == "CF" replace country = 43 if land == "TD" replace country = 44 if land == "CL" replace country = 45 if land == "CN" replace country = 46 if land == "CX" replace country = 47 if land == "CC" replace country = 48 if land == "CO" replace country = 49 if land == "KM" replace country = 50 if land == "CG" replace country = 51 if land == "CD" replace country = 52 if land == "CK" replace country = 53 if land == "CR" replace country = 54 if land == "CI" replace country = 55 if land == "HR" replace country = 56 if land == "CU" replace country = 57 if land == "CY" replace country = 58 if land == "CZ" replace country = 59 if land == "DK" replace country = 60 if land == "DJ" replace country = 61 if land == "DM" replace country = 62 if land == "DO" replace country = 63 if land == "EC" replace country = 64 if land == "EG" replace country = 65 if land == "SV" replace country = 66 if land == "GQ" replace country = 67 if land == "ER" replace country = 68 if land == "EE" replace country = 69 if land == "ET" replace country = 70 if land == "FK" replace country = 71 if land == "FO" replace country = 72 if land == "FJ" replace country = 73 if land == "FI" replace country = 74 if land == "FR" replace country = 75 if land == "GF" replace country = 76 if land == "PF" replace country = 77 if land == "TF" replace country = 78 if land == "GA" replace country = 79 if land == "GM" replace country = 80 if land == "GE" replace country = 81 if land == "DE" replace country = 82 if land == "GH" replace country = 83 if land == "GI" replace country = 84 if land == "GR" replace country = 85 if land == "GL" replace country = 86 if land == "GD" replace country = 87 if land == "GP" replace country = 88 if land == "GU" replace country = 89 if land == "GT" replace country = 90 if land == "GG" replace country = 91 if land == "GN" replace country = 92 if land == "GW" replace country = 93 if land == "GY" replace country = 94 if land == "HT" replace country = 95 if land == "HM" replace country = 96 if land == "VA" replace country = 97 if land == "HN" replace country = 98 if land == "HK" replace country = 99 if land == "HU" replace country = 100 if land == "IS" replace country = 101 if land == "IN" replace country = 102 if land == "ID" replace country = 103 if land == "IR" replace country = 104 if land == "IQ" replace country = 105 if land == "IE" replace country = 106 if land == "IM" replace country = 107 if land == "IL" replace country = 108 if land == "IT" replace country = 109 if land == "JM" replace country = 110 if land == "JP" replace country = 111 if land == "JE" replace country = 112 if land == "JO" replace country = 113 if land == "KZ" replace country = 114 if land == "KE" replace country = 115 if land == "KI" replace country = 116 if land == "KP" replace country = 117 if land == "KR" replace country = 118 if land == "KW" replace country = 119 if land == "KG" replace country = 120 if land == "LA" replace country = 121 if land == "LV" replace country = 122 if land == "LB" replace country = 123 if land == "LS" replace country = 124 if land == "LR" replace country = 125 if land == "LY" replace country = 126 if land == "LI" replace country = 127 if land == "LT" replace country = 128 if land == "LU" replace country = 129 if land == "MO" replace country = 130 if land == "MK" replace country = 131 if land == "MG" replace country = 132 if land == "MW" replace country = 133 if land == "MY" replace country = 134 if land == "MV" replace country = 135 if land == "ML" replace country = 136 if land == "MT" replace country = 137 if land == "MH" replace country = 138 if land == "MQ" replace country = 139 if land == "MR" replace country = 140 if land == "MU" replace country = 141 if land == "YT" replace country = 142 if land == "MX" replace country = 143 if land == "FM" replace country = 144 if land == "MD" replace country = 145 if land == "MC" replace country = 146 if land == "MN" replace country = 147 if land == "ME" replace country = 148 if land == "MS" replace country = 149 if land == "MA" replace country = 150 if land == "MZ" replace country = 151 if land == "MM" replace country = 152 if land == "NA" replace country = 153 if land == "NR" replace country = 154 if land == "NP" replace country = 155 if land == "NL" replace country = 156 if land == "AN" replace country = 157 if land == "NC" replace country = 158 if land == "NZ" replace country = 159 if land == "NI" replace country = 160 if land == "NE" replace country = 161 if land == "NG" replace country = 162 if land == "NU" replace country = 163 if land == "NF" replace country = 164 if land == "MP" replace country = 165 if land == "NO" replace country = 166 if land == "OM" replace country = 167 if land == "PK" replace country = 168 if land == "PW" replace country = 169 if land == "PS" replace country = 170 if land == "PA" replace country = 171 if land == "PG" replace country = 172 if land == "PY" replace country = 173 if land == "PE" replace country = 174 if land == "PH" replace country = 175 if land == "PN" replace country = 176 if land == "PL" replace country = 177 if land == "PT" replace country = 178 if land == "PR" replace country = 179 if land == "QA" replace country = 180 if land == "RE" replace country = 181 if land == "RO" replace country = 182 if land == "RU" replace country = 183 if land == "RW" replace country = 184 if land == "BL" replace country = 185 if land == "SH" replace country = 186 if land == "KN" replace country = 187 if land == "LC" replace country = 188 if land == "MF" replace country = 189 if land == "PM" replace country = 190 if land == "VC" replace country = 191 if land == "WS" replace country = 192 if land == "SM" replace country = 193 if land == "ST" replace country = 194 if land == "SA" replace country = 195 if land == "SN" replace country = 196 if land == "RS" replace country = 197 if land == "SC" replace country = 198 if land == "SL" replace country = 199 if land == "SG" replace country = 200 if land == "SK" replace country = 201 if land == "SI" replace country = 202 if land == "SB" replace country = 203 if land == "SO" replace country = 204 if land == "ZA" replace country = 205 if land == "GS" replace country = 206 if land == "ES" replace country = 207 if land == "LK" replace country = 208 if land == "SD" replace country = 209 if land == "SR" replace country = 210 if land == "SJ" replace country = 211 if land == "SZ" replace country = 212 if land == "SE" replace country = 213 if land == "CH" replace country = 214 if land == "SY" replace country = 215 if land == "TW" replace country = 216 if land == "TJ" replace country = 217 if land == "TZ" replace country = 218 if land == "TH" replace country = 219 if land == "TL" replace country = 220 if land == "TG" replace country = 221 if land == "TK" replace country = 222 if land == "TO" replace country = 223 if land == "TT" replace country = 224 if land == "TN" replace country = 225 if land == "TR" replace country = 226 if land == "TM" replace country = 227 if land == "TC" replace country = 228 if land == "TV" replace country = 229 if land == "UG" replace country = 230 if land == "UA" replace country = 231 if land == "AE" replace country = 232 if land == "GB" replace country = 233 if land == "US" replace country = 234 if land == "UM" replace country = 235 if land == "UY" replace country = 236 if land == "UZ" replace country = 237 if land == "VU" replace country = 238 if land == "VE" replace country = 239 if land == "VN" replace country = 240 if land == "VG" replace country = 241 if land == "VI" replace country = 242 if land == "WF" replace country = 243 if land == "EH" replace country = 244 if land == "YE" replace country = 245 if land == "ZM" replace country = 246 if land == "ZW" replace country = 247 if land == "WW" replace country = 248 if land == "YY" replace country = 249 if land == "??" replace country = 250 if land == "ZZ" tabstat id jahr monat HS6 HS2 HS2section euro kg country, statistics(n mean sd p1 p50 p99) * ############################################################################## * 2009 preserve keep if jahr == 2009 * Wert aller Transaktionen pro Unternehmen (in Millionen Euro) replace euro = euro / 1000000 sort id by id: egen summe_handel_id = sum(euro) duplicates drop id, force tabstat summe_handel_id, statistics(n mean sd p1 p50 p99) * Wert aller Transaktionen insgesamt (in Millionen Euro) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Sortieren aufsteigend nach Wert aller Transaktionen pro Unternehmen gsort - summe_handel_id * Anteil der 3/10/50/100 groessten Haendler-Unternehmen am Gesamthandel egen tradesum_3 = sum(summe_handel_id) in 1/3 generate share_3 = tradesum_3 / summe_handel_total * 100 tabstat share_3, statistics(n mean sd) egen tradesum_10 = sum(summe_handel_id) in 1/10 generate share_10 = tradesum_10 / summe_handel_total * 100 tabstat share_10, statistics(n mean sd) egen tradesum_50 = sum(summe_handel_id) in 1/50 generate share_50 = tradesum_50 / summe_handel_total * 100 tabstat share_50, statistics(n mean sd) egen tradesum_100 = sum(summe_handel_id) in 1/100 generate share_100 = tradesum_100 / summe_handel_total * 100 tabstat share_100, statistics(n mean sd) keep id summe_handel_id save part1.dta, replace restore preserve keep if jahr == 2009 sort id HS6 land duplicates drop id HS6 land, force egen market = group(id HS6 land) sort id HS6 land by id: egen numbermarkets_id = count(market) duplicates drop id, force keep id numbermarkets_id save part2.dta, replace restore preserve clear use part1.dta merge 1:1 id using part2.dta keep if _merge == 3 tabstat summe_handel_id numbermarkets_id, statistics(n mean sd p1 p50 p99) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Anzahl Maerkte fuer Top 3/10/50/100 Handelsunternehmen gsort - summe_handel_id egen summarkets_3 = sum(numbermarkets_id) in 1/3 generate averagemarkets_3 = summarkets_3 / 3 tabstat averagemarkets_3, statistics(n mean sd) egen summarkets_10 = sum(numbermarkets_id) in 1/10 generate averagemarkets_10 = summarkets_10 / 10 tabstat averagemarkets_10, statistics(n mean sd) egen summarkets_50 = sum(numbermarkets_id) in 1/50 generate averagemarkets_50 = summarkets_50 / 50 tabstat averagemarkets_50, statistics(n mean sd) egen summarkets_100 = sum(numbermarkets_id) in 1/100 generate averagemarkets_100 = summarkets_100 / 100 tabstat averagemarkets_100, statistics(n mean sd) * Anteil am Gesamtmarkt fuer Unternehmen mit Top 3/10/50/100 Maerkten generate anteil_gesamt = summe_handel_id / summe_handel_total * 100 gsort - numbermarkets_id egen anteilmarkt_3 = sum(anteil_gesamt) in 1/3 tabstat anteilmarkt_3, statistics(n mean sd) egen anteilmarkt_10 = sum(anteil_gesamt) in 1/10 tabstat anteilmarkt_10, statistics(n mean sd) egen anteilmarkt_50 = sum(anteil_gesamt) in 1/50 tabstat anteilmarkt_50, statistics(n mean sd) egen anteilmarkt_100 = sum(anteil_gesamt) in 1/100 tabstat anteilmarkt_100, statistics(n mean sd) restore * 2010 preserve keep if jahr == 2010 * Wert aller Transaktionen pro Unternehmen (in Millionen Euro) replace euro = euro / 1000000 sort id by id: egen summe_handel_id = sum(euro) duplicates drop id, force tabstat summe_handel_id, statistics(n mean sd p1 p50 p99) * Wert aller Transaktionen insgesamt (in Millionen Euro) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Sortieren aufsteigend nach Wert aller Transaktionen pro Unternehmen gsort - summe_handel_id * Anteil der 3/10/50/100 groessten Haendler-Unternehmen am Gesamthandel egen tradesum_3 = sum(summe_handel_id) in 1/3 generate share_3 = tradesum_3 / summe_handel_total * 100 tabstat share_3, statistics(n mean sd) egen tradesum_10 = sum(summe_handel_id) in 1/10 generate share_10 = tradesum_10 / summe_handel_total * 100 tabstat share_10, statistics(n mean sd) egen tradesum_50 = sum(summe_handel_id) in 1/50 generate share_50 = tradesum_50 / summe_handel_total * 100 tabstat share_50, statistics(n mean sd) egen tradesum_100 = sum(summe_handel_id) in 1/100 generate share_100 = tradesum_100 / summe_handel_total * 100 tabstat share_100, statistics(n mean sd) keep id summe_handel_id save part1.dta, replace restore preserve keep if jahr == 2010 sort id HS6 land duplicates drop id HS6 land, force egen market = group(id HS6 land) sort id HS6 land by id: egen numbermarkets_id = count(market) duplicates drop id, force keep id numbermarkets_id save part2.dta, replace restore preserve clear use part1.dta merge 1:1 id using part2.dta keep if _merge == 3 tabstat summe_handel_id numbermarkets_id, statistics(n mean sd p1 p50 p99) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Anzahl Maerkte fuer Top 3/10/50/100 Handelsunternehmen gsort - summe_handel_id egen summarkets_3 = sum(numbermarkets_id) in 1/3 generate averagemarkets_3 = summarkets_3 / 3 tabstat averagemarkets_3, statistics(n mean sd) egen summarkets_10 = sum(numbermarkets_id) in 1/10 generate averagemarkets_10 = summarkets_10 / 10 tabstat averagemarkets_10, statistics(n mean sd) egen summarkets_50 = sum(numbermarkets_id) in 1/50 generate averagemarkets_50 = summarkets_50 / 50 tabstat averagemarkets_50, statistics(n mean sd) egen summarkets_100 = sum(numbermarkets_id) in 1/100 generate averagemarkets_100 = summarkets_100 / 100 tabstat averagemarkets_100, statistics(n mean sd) * Anteil am Gesamtmarkt fuer Unternehmen mit Top 3/10/50/100 Maerkten generate anteil_gesamt = summe_handel_id / summe_handel_total * 100 gsort - numbermarkets_id egen anteilmarkt_3 = sum(anteil_gesamt) in 1/3 tabstat anteilmarkt_3, statistics(n mean sd) egen anteilmarkt_10 = sum(anteil_gesamt) in 1/10 tabstat anteilmarkt_10, statistics(n mean sd) egen anteilmarkt_50 = sum(anteil_gesamt) in 1/50 tabstat anteilmarkt_50, statistics(n mean sd) egen anteilmarkt_100 = sum(anteil_gesamt) in 1/100 tabstat anteilmarkt_100, statistics(n mean sd) restore * 2011 preserve keep if jahr == 2011 * Wert aller Transaktionen pro Unternehmen (in Millionen Euro) replace euro = euro / 1000000 sort id by id: egen summe_handel_id = sum(euro) duplicates drop id, force tabstat summe_handel_id, statistics(n mean sd p1 p50 p99) * Wert aller Transaktionen insgesamt (in Millionen Euro) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Sortieren aufsteigend nach Wert aller Transaktionen pro Unternehmen gsort - summe_handel_id * Anteil der 3/10/50/100 groessten Haendler-Unternehmen am Gesamthandel egen tradesum_3 = sum(summe_handel_id) in 1/3 generate share_3 = tradesum_3 / summe_handel_total * 100 tabstat share_3, statistics(n mean sd) egen tradesum_10 = sum(summe_handel_id) in 1/10 generate share_10 = tradesum_10 / summe_handel_total * 100 tabstat share_10, statistics(n mean sd) egen tradesum_50 = sum(summe_handel_id) in 1/50 generate share_50 = tradesum_50 / summe_handel_total * 100 tabstat share_50, statistics(n mean sd) egen tradesum_100 = sum(summe_handel_id) in 1/100 generate share_100 = tradesum_100 / summe_handel_total * 100 tabstat share_100, statistics(n mean sd) keep id summe_handel_id save part1.dta, replace restore preserve keep if jahr == 2011 sort id HS6 land duplicates drop id HS6 land, force egen market = group(id HS6 land) sort id HS6 land by id: egen numbermarkets_id = count(market) duplicates drop id, force keep id numbermarkets_id save part2.dta, replace restore preserve clear use part1.dta merge 1:1 id using part2.dta keep if _merge == 3 tabstat summe_handel_id numbermarkets_id, statistics(n mean sd p1 p50 p99) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Anzahl Maerkte fuer Top 3/10/50/100 Handelsunternehmen gsort - summe_handel_id egen summarkets_3 = sum(numbermarkets_id) in 1/3 generate averagemarkets_3 = summarkets_3 / 3 tabstat averagemarkets_3, statistics(n mean sd) egen summarkets_10 = sum(numbermarkets_id) in 1/10 generate averagemarkets_10 = summarkets_10 / 10 tabstat averagemarkets_10, statistics(n mean sd) egen summarkets_50 = sum(numbermarkets_id) in 1/50 generate averagemarkets_50 = summarkets_50 / 50 tabstat averagemarkets_50, statistics(n mean sd) egen summarkets_100 = sum(numbermarkets_id) in 1/100 generate averagemarkets_100 = summarkets_100 / 100 tabstat averagemarkets_100, statistics(n mean sd) * Anteil am Gesamtmarkt fuer Unternehmen mit Top 3/10/50/100 Maerkten generate anteil_gesamt = summe_handel_id / summe_handel_total * 100 gsort - numbermarkets_id egen anteilmarkt_3 = sum(anteil_gesamt) in 1/3 tabstat anteilmarkt_3, statistics(n mean sd) egen anteilmarkt_10 = sum(anteil_gesamt) in 1/10 tabstat anteilmarkt_10, statistics(n mean sd) egen anteilmarkt_50 = sum(anteil_gesamt) in 1/50 tabstat anteilmarkt_50, statistics(n mean sd) egen anteilmarkt_100 = sum(anteil_gesamt) in 1/100 tabstat anteilmarkt_100, statistics(n mean sd) restore * 2012 preserve keep if jahr == 2012 * Wert aller Transaktionen pro Unternehmen (in Millionen Euro) replace euro = euro / 1000000 sort id by id: egen summe_handel_id = sum(euro) duplicates drop id, force tabstat summe_handel_id, statistics(n mean sd p1 p50 p99) * Wert aller Transaktionen insgesamt (in Millionen Euro) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Sortieren aufsteigend nach Wert aller Transaktionen pro Unternehmen gsort - summe_handel_id * Anteil der 3/10/50/100 groessten Haendler-Unternehmen am Gesamthandel egen tradesum_3 = sum(summe_handel_id) in 1/3 generate share_3 = tradesum_3 / summe_handel_total * 100 tabstat share_3, statistics(n mean sd) egen tradesum_10 = sum(summe_handel_id) in 1/10 generate share_10 = tradesum_10 / summe_handel_total * 100 tabstat share_10, statistics(n mean sd) egen tradesum_50 = sum(summe_handel_id) in 1/50 generate share_50 = tradesum_50 / summe_handel_total * 100 tabstat share_50, statistics(n mean sd) egen tradesum_100 = sum(summe_handel_id) in 1/100 generate share_100 = tradesum_100 / summe_handel_total * 100 tabstat share_100, statistics(n mean sd) keep id summe_handel_id save part1.dta, replace restore preserve keep if jahr == 2012 sort id HS6 land duplicates drop id HS6 land, force egen market = group(id HS6 land) sort id HS6 land by id: egen numbermarkets_id = count(market) duplicates drop id, force keep id numbermarkets_id save part2.dta, replace restore preserve clear use part1.dta merge 1:1 id using part2.dta keep if _merge == 3 tabstat summe_handel_id numbermarkets_id, statistics(n mean sd p1 p50 p99) egen summe_handel_total = sum(summe_handel_id) tabstat summe_handel_total, statistics(n mean sd p1 p50 p99) * Anzahl Maerkte fuer Top 3/10/50/100 Handelsunternehmen gsort - summe_handel_id egen summarkets_3 = sum(numbermarkets_id) in 1/3 generate averagemarkets_3 = summarkets_3 / 3 tabstat averagemarkets_3, statistics(n mean sd) egen summarkets_10 = sum(numbermarkets_id) in 1/10 generate averagemarkets_10 = summarkets_10 / 10 tabstat averagemarkets_10, statistics(n mean sd) egen summarkets_50 = sum(numbermarkets_id) in 1/50 generate averagemarkets_50 = summarkets_50 / 50 tabstat averagemarkets_50, statistics(n mean sd) egen summarkets_100 = sum(numbermarkets_id) in 1/100 generate averagemarkets_100 = summarkets_100 / 100 tabstat averagemarkets_100, statistics(n mean sd) * Anteil am Gesamtmarkt fuer Unternehmen mit Top 3/10/50/100 Maerkten generate anteil_gesamt = summe_handel_id / summe_handel_total * 100 gsort - numbermarkets_id egen anteilmarkt_3 = sum(anteil_gesamt) in 1/3 tabstat anteilmarkt_3, statistics(n mean sd) egen anteilmarkt_10 = sum(anteil_gesamt) in 1/10 tabstat anteilmarkt_10, statistics(n mean sd) egen anteilmarkt_50 = sum(anteil_gesamt) in 1/50 tabstat anteilmarkt_50, statistics(n mean sd) egen anteilmarkt_100 = sum(anteil_gesamt) in 1/100 tabstat anteilmarkt_100, statistics(n mean sd) restore log close exit, STATA clear