Posts tonen met het label classification. Alle posts tonen
Posts tonen met het label classification. Alle posts tonen

zondag 10 april 2016

EU28 Member States in seven clusters

It's a very repetitive task to always cluster European Union Members States, but despite the heterogeneity in any possible group of clusters, it is probably the only way to have a basis for comparison.

My preferred clusters consist of the EU-15 and the New Member States, or Central and Eastern Europe. Within each group, we can further split up by broad welfare state or cultural groups. The syntax below for Stata should be self-explanatory.

gene byte eu28 = 0
replace   eu28 = 1 if inlist(geo,"BE","DE","FR","AT","NL")  // Continental Western Europe
replace   eu28 = 2 if inlist(geo,"GB","IE")     // British isles
replace   eu28 = 3 if inlist(geo,"SE","FI","NO","DK")     // Scandinavia
replace   eu28 = 4 if inlist(geo,"ES","IT","PT","GR")     // Southern Europe
replace   eu28 = 5 if inlist(geo,"HU","PL","SI","SK","CZ")  // CEE Slavic (and Hungary)
replace   eu28 = 6 if inlist(geo,"LT","LV","EE")            // CEE Baltic
replace   eu28 = 7 if inlist(geo,"HR","RO","BG","CY","MT")  // CEE Balkan and Mediterranean Isles

dinsdag 5 februari 2013

Coding sectors based on NACE rev 1.1 and NACE rev. 2


Below is a broad categorisation of the NACE activities in four groups:

  1. Primary sector and construction
  2. Manufacturing and energy (including water, waste and recycling)
  3. Services and entertainment
  4. Public sector, education and health (including libraries)

The syntax below can be used in Stata straight away:

Based on NACE rev. 1.1

gene s_industryR1 = .
replace s_industryR1 = 1 if y10_nace_rev1 >= 1 & y10_nace_rev1 <= 14 // primary sector + construction
replace s_industryR1 = 1 if y10_nace_rev1 == 45 // primary sector + construction
replace s_industryR1 = 2 if y10_nace_rev1 >= 15 & y10_nace_rev1 <= 41 // manufacturing + energy ressources
replace s_industryR1 = 2 if y10_nace_rev1 == 90 // manufacturing + energy ressources
replace s_industryR1 = 3 if y10_nace_rev1 >= 50 & y10_nace_rev1 <= 74 // services + entertainment
replace s_industryR1 = 3 if y10_nace_rev1 >= 91 & y10_nace_rev1 <= 97 // services + entertainment
replace s_industryR1 = 4 if y10_nace_rev1 >= 75 & y10_nace_rev1 <= 85 // PEH
replace s_industryR1 = 4 if y10_nace_rev1 == 99 // PEH


Based on NACE rev. 2

gene s_industryR2 = .
replace s_industryR2 = 1 if y10_nace_rev2 >= 1 & y10_nace_rev2 <= 9 // primary sector + construction
replace s_industryR2 = 1 if y10_nace_rev2 >= 41 & y10_nace_rev2 <= 43 // primary sector + construction
replace s_industryR2 = 2 if y10_nace_rev2 >= 10 & y10_nace_rev2 <= 39 // manufacturing + energy ressources
replace s_industryR2 = 3 if y10_nace_rev2 >= 45 & y10_nace_rev2 <= 82 // services + entertainment
replace s_industryR2 = 3 if y10_nace_rev2 >= 92 & y10_nace_rev2 <= 98 // services + entertainment
replace s_industryR2 = 3 if y10_nace_rev2 == 90 // services + entertainment
replace s_industryR2 = 4 if y10_nace_rev2 >= 84 & y10_nace_rev2 <= 88 // PEH
replace s_industryR2 = 4 if y10_nace_rev2 == 91 // PEH
replace s_industryR2 = 4 if y10_nace_rev2 == 99 // PEH

Info on the box: http://www.quackit.com/html/codes/horizontal_scroll.cfm