* Encoding: windows-1252. * ==================================================================================================. * EU-SILC Cross 2018 - release 2020-09 / DOI: https://doi.org/10.2907/EUSILC2004-2019V.1 * * When publishing statistics derived from the EU-SILC UDB, please state as source: * "EU-SILC UDB – version of 2020-09" * * SPSS Command Syntax File * 2018_cross_eu_silc_d_ver_2020_09.sps * * (c) GESIS 2021-01-12 * * PLEASE NOTE * For Differences between data as described in the guidelines * and the anonymised user database as well as country specific anonymisation measures see: * C-2018 DIFFERENCES BETWEEN DATA COLLECTED.doc * * ==================================================================================================. * * EU-SILC - Cross - Household register file * * * Transforms the EU-SILC CSV-data (as released by Eurostat) into an SPSS-Systemfile * * This version of the EU-SILC has been delivered in form of seperate country files. * The following syntax transforms the raw data into one SPSS file using all available country files. * * Country files are delivered in the format UDB_c*country_stub*.csv * * This SPSS-File is licensed under a * Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License * * * Wirth, Heike (2020): 2018_cross_eu_silc_d_ver_2020_09.sps. * SPSS-Syntax for transforming EU-SILC csv data into an SPSS-Systemfile. * * https://www.gesis.org/gml/european-microdata/eu-silc/ * * Contact: heike.wirth@gesis.org ************************************************************************************************************************************. set decimal=DOT. * When using SPSS earlier than V16 you might not use "set unicode" . set unicode=OFF. *----------------------------------------------------------------- Start definition macro ---------------------------------------------------------------. DEFINE !C2018_D (). *-------------------------------------------------------- CONFIGURATION SECTION - Start ------------------------------------------------------. * The following command should contain the complete path where the CSV data files are stored; * 1) Change CSV_PATH to your file path; (E.g. C:\EU-SILC\Crossectional 2004-2018\); * 2) But keep path structure as delivered by Eurostat CSV_PATH/COUNTRY/YEAR . !LET !csv_path ='CSV_PATH\' * The following command should contain the complete path where the SPSS data files should be stored; * Change SPSS_PATH to your file path. !LET !spss_path ='SPSS_PATH\' * The following command should contain the name of the SPSS data file (specify without .sav extension); * Change SPSS_FILENAME to your final filename. !LET !finalfile='SPSS_FILENAME' *----------------------------------------------------------- CONFIGURATION SECTION - End ---------------------------------------------------------. * There should be probably nothing to change below this line. * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------. *------------------------------------------------------------- Definition of country stubs -----------------------------------------------------------------------. !LET !csvfiles= 'UDB_cAT UDB_cBE UDB_cBG UDB_cCH UDB_cCY UDB_cCZ UDB_cDE UDB_cDK UDB_cEE' + ' UDB_cEL UDB_cES UDB_cFI UDB_cFR UDB_cHR UDB_cHU UDB_cIE UDB_cIS UDB_cIT UDB_cLT UDB_cLU UDB_cLV UDB_cMT' + ' UDB_cNL UDB_cNO UDB_cPL UDB_cPT UDB_cRO UDB_cRS UDB_cSE UDB_cSI UDB_cSK UDB_cUK'. !LET !CC= 'AT BE BG CH CY CZ DE DK EE EL ES FI FR HR HU IE IT IS LT LU LV MT NL NO PL PT RO RS SE SI SK UK'. !DO !i !IN (!CC) GET DATA /TYPE=TXT /FILE=!QUOTE(!CONCAT(!csv_path,!i,'\2018\UDB_c',!i,'18D.csv')) /ENCODING='Locale' /DELCASE=LINE /DELIMITERS="," /ARRANGEMENT=DELIMITED /FIRSTCASE=2 /IMPORTCASE=ALL /VARIABLES= DB010 F4.0 DB020 A2 DB030 F7.0 DB040 A4 DB040_F F1.0 DB060 F1.0 DB060_F F2.0 DB062 F1.0 DB062_F F2.0 DB070 F1.0 DB070_F F2.0 DB075 F1.0 DB075_F F1.0 DB090 COMMA8.5 DB090_F F1.0 DB100 F1.0 DB100_F F1.0. Execute. VARIABLE LABELS DB010 'Year of the survey' / DB020 'Country alphanumeric' / DB030 'Household ID' / DB040 'Region (DE, NL, PT: missing)' / DB040_F 'Flag' / DB060 'PSU-1 (first stage)' / DB060_F 'Flag' / DB062 'PSU-2 (Second stage)' / DB062_F 'Flag' / DB070 'Order of selection of PSU' / DB070_F 'Flag' / DB075 'Rotation Group' / DB075_F 'Flag' / DB090 'Household cross-sectional weight' / DB090_F 'Flag' / DB100 'Degree of urbanisation ((DE, NL, SI: missing; EE, LV:1,2 = 1; MT:2,3 = 2)' / DB100_F 'Flag'. VALUE LABELS DB020 'BE' "Belgique" 'BG' "Bulgaria" 'CZ' "Czech Republic" 'DK' "Danmark" 'DE' "Deutschland" 'EE' "Estonia" 'EL' "Ellada" 'IE' "Ireland" 'GR' "Ellada" 'ES' "Espana" 'FR' "France" 'IT' "Italia" 'CY' "Cyprus" 'LV' "Latvia" 'LT' "Lithuania" 'LU' "Luxembourg" 'HU' "Hungary" 'MT' "Malta" 'NL' "Nederland" 'AT' "Oesterreich" 'PL' "Poland" 'PT' "Portugal" 'RO' "Romania" 'SI' "Slovenia" 'SK' "Slovak Republic" 'FI' "Suomi" 'SE' "Sverige" 'UK' "United Kingdom" 'CH' "Switzerland" 'HR' "Croatia" 'IS' "Iceland" 'NO' "Norway" 'RS' "Srbija" / DB040 ' ' "info not provided for DE, NL, PT, RS" / DB040_F -1 'Missing' 1 'Filled according to NUTS-16' / DB060_F DB062_F 1 'Rotation is implemented at PSU level (the PSU rotates in and out of the sample' 2 'Rotation is implemented at SSU or household level (The PSU remains in the sample for the entire duration of EU-SILC' -2 'Not applicable' / DB070_F 1 'Filled' -2 'Not applicable' 11 "Order on sampl.frame is fixed for all survey years/PSUs have equal probability of selection (within explicit strata)" 12 "Order on sampl.frame is fixed for all survey years/PSUs have unequal probability of selection (within explicit strata)" 21 "Order on sampl.frame may change over time/PSUs have equal probability of selection (within explicit strata)" 22 "Order on sampl.frame may change over time/PSUs have unqual probability of selection (within explicit strata)" / DB075_F 1 'Filled' -2 ' Not applicable (no rotational design is used)' / DB090_F 1 'Filled' -7 'Not applicable (DB010 not equal last year) ' / DB100 1 'Densely populated area (EE,LV:1,2=1)' 2 'Intermediate area (MT:2,3=2)' 3 'Thinly populated area' / DB100_F 1 'Filled' -1 'Missing'. SAVE OUTFILE= !QUOTE(!CONCAT(!spss_path,'UDB_c',!i,'18D.sav')). !DOEND. *-------------------------------------------------- Compile and save final file -----------------------------------------------------------------------------------. !LET !firstfile=1. !DO !filestub !IN (!csvfiles). !IF (!firstfile=1) !THEN GET FILE=!QUOTE(!CONCAT(!spss_path,!filestub,'18D.sav')). !LET !firstfile=0. !ELSE ADD FILES FILE=* /FILE=!QUOTE(!CONCAT(!spss_path,!filestub,'18D.sav')). !IFEND. !DOEND. SAVE OUTFILE=!QUOTE(!CONCAT(!spss_path,!finalfile,'.sav')). *--------------------------------------------------------Delete single country files -------------------------------------------------------------------------------. !DO !filestub !IN (!csvfiles). ERASE FILE=!QUOTE(!CONCAT(!spss_path,!filestub,'18D.sav')). !DOEND. !ENDDEFINE. *----------------------------------------------------------------- End definition macro ---------------------------------------------------------------. *----------------------------------------------------------------- Invoke macro ---------------------------------------------------------------------------. !C2018_D.