* 2011_eu_silc_hhld_register_d.do * * STATA Command Syntax File * Stata 12.0; * * Transforms the EU-SILC CSV-data (as released by Eurostat) into an Stata-Systemfile * * EU-SILC - Panel 2011 * Household register file: * UDB_l11D_ver 2011-1 from 01-08-2013.csv * * PLEASE NOTE * For Differences between data as described in the guidelines * and the anonymised user database as well as country specific anonymisation measures see: * L-2011 DIFFERENCES BETWEEN DATA COLLECTED AND UDB 13-08-01.doc * * * (c) GESIS 01-10-2013 * GESIS - Leibniz Institute for the Social Sciences * German Microdata Lab * Heike Wirth; Florian Bains * http://www.gesis.org/en/institute/ * * Contact: heike.wirth@gesis.org * * http://www.gesis.org/en/institute/ * http://www.gesis.org/en/services/data-analysis/official-microdata/european-microdata/eu-silc/eu-silc-tools/ * * EU-Microdata mailing list: EU-microdata-L@gesis.org * * http://www.gesis.org/en/services/data-analysis/official-microdata/european-microdata/eu-mailinglist/ * **************************************************************************************************** /* Initialization commands */ clear capture log close set more off version 12.0 set linesize 250 set memory 1G // not necessary in Stata 12 set varabbrev off #delimit ; * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; * CONFIGURATION SECTION - Start ; * The following command should contain the complete path and name of the Stata log file. Change LOG_FILENAME to your filename ; local log_file "LOG_FILENAME" ; * The following command should contain the complete path and name of the CSV data file. Change CSV_FILENAME to your filename ; local csv_data_file "CSV_FILENAME" ; * The following command should contain the complete path and name of the STATA file, usual file extension "dta". Change STATA_FILENAME to your filename ; local stata_file "STATA_FILENAME" ; * CONFIGURATION SECTION - End ; * There should be probably nothing to change below this line ; * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; log using "`log_file'", replace text ; insheet using "`csv_file'", comma names case; * Note that some variables in the csv-data file might in lowercase * To ensure that the dataset contains only variable names in uppercase ; foreach var of varlist _all { ; local newname = upper("`var'") ; cap rename `var' `newname' ; } ; label define DB020_neu 1 "BE" 2 "DK" 3 "DE" 4 "GR" 5 "ES" 6 "FR" 7 "IE" 8 "IT" 9 "LU" 10 "NL" 11 "AT" 12 "PT" 13 "FI" 14 "SE" 15 "UK" 16 "BG" 17 "CY" 18 "CZ" 19 "EE" 20 "HU" 21 "LV" 22 "LT" 23 "MT" 24 "PL" 25 "RO" 26 "SK" 27 "SI" 28 "IS" 29 "NO" 30 "CH" 31 "HR" 32 "TR" ; encode DB020, gen(DB020_neu) ; label define DB040_neu 1 "AT1" 2 "AT2" 3 "AT3" 4 "BE1" 5 "BE2" 6 "BE3" 7 "BG3" 8 "BG4" 9 "CY0" 10 "CZ01" 11 "CZ02" 12 "CZ03" 13 "CZ04" 14 "CZ05" 15 "CZ06" 16 "CZ07" 17 "CZ08" 18 "DK0" 19 "EE0" 20 "ES11" 21 "ES12" 22 "ES13" 23 "ES21" 24 "ES22" 25 "ES23" 26 "ES24" 27 "ES30" 28 "ES41" 29 "ES42" 30 "ES43" 31 "ES51" 32 "ES52" 33 "ES53" 34 "ES61" 35 "ES62" 36 "ES63" 37 "ES64" 38 "ES70" 39 "FI13" 40 "FI18" 41 "FI19" 42 "FI1A" 43 "FR10" 44 "FR21" 45 "FR22" 46 "FR23" 47 "FR24" 48 "FR25" 49 "FR26" 50 "FR30" 51 "FR41" 52 "FR42" 53 "FR43" 54 "FR51" 55 "FR52" 56 "FR53" 57 "FR61" 58 "FR62" 59 "FR63" 60 "FR71" 61 "FR72" 62 "FR81" 63 "FR82" 64 "FR83" 65 "HU1" 66 "HU2" 67 "HU3" 68 "IE0" 69 "IS" 70 "ITC" 71 "ITF" 72 "ITG" 73 "ITH" 74 "ITI" 75 "LT0" 76 "LU0" 77 "LV0" 78 "MT0" 79 "NO0" 80 "PL1" 81 "PL2" 82 "PL3" 83 "PL4" 84 "PL5" 85 "PL6" 86 "RO1" 87 "RO2" 88 "RO3" 89 "RO4" 90 "SE1" 91 "SE2" 92 "SE3" 93 "SK0" 94 "UKC1" 95 "EL1" 96 "EL2" 97 "EL3" 98 "EL4" 99 "UKC2" 100 "UKD1" 101 "UKD3" 102 "UKD4" 103 "UKD6" 104 "UKD7" 105 "UKE1" 106 "UKE2" 107 "UKE3" 108 "UKE4" 109 "UKF1" 110 "UKF2" 111 "UKF3" 112 "UKG1" 113 "UKG2" 114 "UKG3" 115 "UKH1" 116 "UKH2" 117 "UKH3" 118 "UKI1" 119 "UKI2" 120 "UKJ1" 121 "UKJ2" 122 "UKJ3" 123 "UKJ4" 124 "UKK1" 125 "UKK2" 126 "UKK3" 127 "UKK4" 128 "UKL1" 129 "UKL2" 130 "UKM2" 131 "UKM3" 132 "UKM5" 133 "UKM6" 134 "UKN0" 135 "CH0" 136 "FI1B" 137 "FI1C" 138 "FI1D" 139 "HR0" ; encode DB040, gen(DB040_neu) ; rename DB020_neu DB020_num ; label define DB020_num_VALUE_LABELS 1 "BE Belgique" 2 "DK Danmark" 3 "DE Deutschland" 4 "GR Ellada" 5 "ES Espana" 6 "FR France" 7 "IE Ireland" 8 "IT Italia" 9 "LU Luxembourg" 10 "NL Nederland" 11 "AT Oesterreich" 12 "PT Portugal" 13 "FI Suomi" 14 "SE Sverige" 15 "UK United Kingdom" 16 "BG Bulgaria" 17 "CY Cyprus" 18 "CZ Czech Republic" 19 "EE Estonia" 20 "HU Hungary" 21 "LV Latvia" 22 "LT Lithuania" 23 "MT Malta" 24 "PL Poland" 25 "RO Romania" 26 "SK Slovak Republic" 27 "SI Slovenia" 28 "IS Iceland" 29 "NO Norway" 30 "Ch Switzerland" 31 "HR Croatia" 32 "TR Turkey" ; rename DB040_neu DB040_num ; label define DB040_num_VALUE_LABELS 1 "AT1 Ostoesterreich" 2 "AT2 Suedoesterreich" 3 "AT3 Westoesterreich" 4 "BE1 Region de Brux.-Capitale/Brux Hoofdstedelijk Gewest" 5 "BE2 Vlaams Gewest" 6 "BE3 Region Wallonne" 7 "BG3 Severna I Iztochna Bulgaria" 8 "BG4 Yugozapadna I Yuzhna Tsentralna Bulgaria" 9 "CY0 Kibris" 10 "CZ01 Praha" 11 "CZ02 Stredni Cechy" 12 "CZ03 Jihozapad" 13 "CZ04 Severozapad" 14 "CZ05 Severovychod" 15 "CZ06 Jihovychod" 16 "CZ07 Stredni Morava" 17 "CZ08 Moravskoslezsko" 18 "DK0 Danmark" 19 "EE0 Eesti" 20 "ES11 Galicia" 21 "ES12 Principado de Asturias" 22 "ES13 Cantabria" 23 "ES21 País Vasco" 24 "ES22 Comunidad Foral de Navarra" 25 "ES23 La Rioja" 26 "ES24 Aragon" 27 "ES30 Comunidad de Madrid" 28 "ES41 Castilla y Leon" 29 "ES42 Castilla-La Mancha" 30 "ES43 Extremadura" 31 "ES51 Cataluna" 32 "ES52 Comunidad Valenciana" 33 "ES53 Illes Balears" 34 "ES61 Andalucía" 35 "ES62 Region de Murcia" 36 "ES63 Ciudad Autonoma de Ceuta" 37 "ES64 Ciudad Autonoma de Melilla" 38 "ES70 Canarias" 39 "FI13 Itae-Suomi" 40 "FI18 FI18 Etelae-Suomi, FI20 Aland" 41 "FI19 Laensi-Suomi" 42 "FI1A Pohjois-Suomi" 43 "FR10 Ile de France" 44 "FR21 Champagne-Ardenne" 45 "FR22 Picardie" 46 "FR23 Haute-Normandie" 47 "FR24 Centre" 48 "FR25 Basse-Normandie" 49 "FR26 Bourgogne" 50 "FR30 Nord - Pas-de-Calais" 51 "FR41 Lorraine" 52 "FR42 Alsace" 53 "FR43 Franche-Comte" 54 "FR51 Pays de la Loire" 55 "FR52 Bretagne" 56 "FR53 Poitou-Charentes" 57 "FR61 Aquitaine" 58 "FR62 idi-Pyrenees" 59 "FR63 Limousin" 60 "FR71 Rhone-Alpes" 61 "FR72 Auvergne" 62 "FR81 Languedoc-Roussillon" 63 "FR82 Provence-Alpes-Cote dAzur" 64 "FR83 Corse" 65 "HU1 Kozep-Magyarorszag" 66 "HU2 Dunantul" 67 "HU3 Alfold es Eszak" 68 "IE0 Ireland" 69 "IS Iceland" 70 "ITC Nord-ovest" 71 "ITF Sud" 72 "ITG Isole" 73 "ITH Nord-Est" 74 "ITI Centro" 75 "LT0 Lietuva" 76 "LU0 Luxembourg (Grand-Duche)" 77 "LV0 Latvija" 78 "MT0 Malta" 79 "NO0 Norge" 80 "PL1 Region Centralny" 81 "PL2 Region Poludniowy" 82 "PL3 Region Wschodni" 83 "PL4 Region Polnocno-Zachodni" 84 "PL5 Region Poludniowo-Zachodni" 85 "PL6 Region Polnocny" 86 "RO1 Macroregiunea unu" 87 "RO2 Macroregiunea doi" 88 "RO3 macroregiunea trei" 89 "RO4 macroregiunea patru" 90 "SE1 Oestra Sverige" 91 "SE2 Soedra Sverige" 92 "SE3 Norra Sverige" 93 "SK0 Slovenská Republika" 94 "UKC1 Tees Valley and Durham" 95 "EL1 Voria Ellada" 96 "EL2 Kendriki Ellada" 97 "EL3 Attiki" 98 "EL4 Nisia Egeou, Kriti" 99 "UKC2 Northumberland and Tyne and Wear" 100 "UKD1 Cumbria" 101 "UKD3 Cheshire" 102 "UKD4 Greater Manchester" 103 "UKD6 Lancashire" 104 "UKD7 Merseyside" 105 "UKE1 East Yorkshire and North Lincolnshire" 106 "UKE2 North Yorkshire" 107 "UKE3 South Yorkshire" 108 "UKE4 West Yorkshire" 109 "UKF1 Derbyshire and Nottinghamshire" 110 "UKF2 Leicestershire, Rutland and Northamptonshire" 111 "UKF3 Lincolnshire" 112 "UKG1 Herefordshire, Worcestershire and Warwickshire" 113 "UKG2 Shropshire and Staffordshire" 114 "UKG3 West Midlands" 115 "UKH1 East Anglia" 116 "UKH2 Bedfordshire and Hertfordshire" 117 "UKH3 Essex" 118 "UKI1 Inner London" 119 "UKI2 Outer London" 120 "UKJ1 Berkshire, Buckinghamshire and Oxfordshire" 121 "UKJ2 Surrey, East and West Sussex" 122 "UKJ3 Hampshire and Isle of Wight" 123 "UKJ4 Kent" 124 "UKK1 Gloucestershire, Wiltshire and Bristol\Bath area" 125 "UKK2 Dorset and Somerset" 126 "UKK3 Cornwall and Isles of Scilly" 127 "UKK4 Devon" 128 "UKL1 West Wales and The Valleys" 129 "UKL2 East Wales" 130 "UKM2 Eastern Scotland" 131 "UKM3 South Western Scotland" 132 "UKM5 North Eastern Scotland" 133 "UKM6 Highlands and Islands" 134 "UKN0 Northern Ireland" 135 "CH0 Switzerland" 136 "FI1B Helsinki-Uusimaa" 137 "FI1C Etelä-Suomi" 138 "FI1D Pohjois- ja Itä-Suomi" 139 "HR0 Hrvatska" ; * Definition of variable labels ; label variable DB010 "Year of the Survey" ; label variable DB020 "Country alphanumeric" ; label variable DB020_num "Country numeric" ; label variable DB030 "Household ID" ; label variable DB040 "Region (NUTS 1 or 2)" ; label variable DB040_F "Flag" ; label variable DB040_num "Region numeric" ; label variable DB060 "PSU-1 (First stage)" ; label variable DB060_F "Flag" ; label variable DB062 "PSU-2 (Second stage)" ; label variable DB062_F "Flag" ; label variable DB070 "Order of selection of PSU" ; label variable DB070_F "Flag" ; label variable DB075 "Rotational Group" ; label variable DB075_F "Flag" ; label variable DB090 "Household cross-sectional weight" ; label variable DB090_F "Flag" ; label variable DB100 "Degree of urbanisation" ; label variable DB100_F "Flag" ; label variable DB110 "Household status" ; label variable DB110_F "Flag" ; * Definition of category labels ; * DB030 ID number see construction doc "UDB description" point 8.6.6 ; label define DB040_F_VALUE_LABELS -1 "missing" 1 "filled according to NUTS-03" 2 "filled according to NUTS-08" ; label define DB060_F_VALUE_LABELS 1 "filled" -2 "not applicable" ; label define DB062_F_VALUE_LABELS 1 "filled" -2 "not applicable" ; label define DB070_F_VALUE_LABELS 1 "filled" -2 "not applicable" ; label define DB075_F_VALUE_LABELS 1 "filled" -2 "na (no rotational design is used)" ; label define DB090_F_VALUE_LABELS 1 "filled" ; label define DB100_VALUE_LABELS 1 "densely populated area" 2 "intermediate area" 3 "thinly populated area" ; label define DB100_F_VALUE_LABELS 1 "filled" -1 "missing" ; label define DB110_VALUE_LABELS 1 "Hhld from prev. wave: At the same address as last interview" 2 "Hhld from prev. wave:Entire household moved to a private hhld within the country" 3 "Hhld no longer in-scope: Entire hhld moved to a collective hhld/institution within the country" 4 "Hhld no longer in-scope: Hhld moved outside the country" 5 "Hhld no longer in-scope: Entire household died" 6 "Hhld no longer in-scope: Hhld does not contain sample person" 7 "Address non-contacted(unable to access, lost-no info on record on what happened to the hhld)" 8 "New household for this wave: Split-off household" 9 "New household for this wave: New address added to the sample this wave or first wave" 10 "Fusion" 11 "Lost household (no information on record on what happened to the household)" ; label define DB110_F_VALUE_LABELS 1 "filled" ; * Attachement of category labels to variable ; label values DB020_num DB020_num_VALUE_LABELS ; label values DB040_F DB040_F_VALUE_LABELS ; label values DB040_num DB040_num_VALUE_LABELS ; label values DB060_F DB060_F_VALUE_LABELS ; label values DB062_F DB062_F_VALUE_LABELS ; label values DB070_F DB070_F_VALUE_LABELS ; label values DB075_F DB075_F_VALUE_LABELS ; label values DB090_F DB090_F_VALUE_LABELS ; label values DB100 DB100_VALUE_LABELS ; label values DB100_F DB100_F_VALUE_LABELS ; label values DB110 DB110_VALUE_LABELS ; label values DB110_F DB110_F_VALUE_LABELS ; compress ; save "`stata_file'", replace ; log close ; set more on #delimit cr