Appendix: Prepare ESS data for the topic

The dataset ‘Well-being’ published at ESS EduNet, has been cleaned and prepared especially for this topic. This appendix describes how the original ESS round 3 dataset has been modified.

To summarise the main changes:

  1. Variables have been deleted to make the dataset smaller and easier to work with.
  2. Cases have been deleted because of missing values.
  3. The Russian respondents are deleted.
  4. Many variables are recoded.
  5. Some new variables are computed.

The point of departure is the last edition of the ESS round 3 dataset available from the ESS data web site.

If you have a copy of SPSS installed on your computer, you could download the last edition of the ESS round 3 dataset and use this appendix to redo the different steps in the preparation.

Comments to the syntax always starts with ‘*’ and ends with ‘.’.

Please note that you may have to insert the path to the relevant folder when you are running the ‘SAVE’ and ‘GET’ commands. We have written only the name of the dataset: ‘SAVE OUTFILE='ESS3_processed.sav’, we have not indicated the path like for example this: ‘SAVE OUTFILE='C:\ESS EduNet\topic\ESS3_processed.sav’.

Cleaning data set.

*Start SPSS and open a syntax window. Copy the syntax from this appendix, paste the code into the syntax window and run the commands.

* Open the ESS round 3 dataset in SPSS.

GET FILE='ESS3e03.2_F1.sav'.

* Subset the data to a manageable set of variables, about 200.

SAVE OUTFILE='ESS3_processed.sav'
/DROP=prtvtaat TO prtvtaua prtclaat TO prtclaua prtmbaat TO prtmbaua trrenyr TO trrtort dscrrce TO dscrna facntr TO rspslvo gndr2 TO yrbrn yrbrn2 TO rshipa15 edlvbg TO edufld dngoth TO dngna mnactic TO pdjobyr wrkac6m TO uemp5yr hincsrca edulvlp TO dngnap crpdwkp TO atncrse lvgptna TO dvrcdev chldhhe inttph regionat TO supqyr.

* Open the subset of the ESS round 3 data.

GET FILE='ESS3_processed.sav'.

* Recode ‘no family’ as response to family questions as missing variable.

RECODE
FMLENJ FMLSTRS (55=SYSMIS) .
EXECUTE.

* Calculate number of missing values on well-being variables.

COMPUTE missing=nmiss(WRHPP,ENJLF,HAPPY,FLTDPR,FLTSD,STFLFSF,STFSDLV, STFLIFE,LFCLLK,FLTEEFF,CLDGNG,ENRGLOT,FLTTRD,FLTRSTM, HEALTH,SLPRL,PSTVMS,FLRMS, OPTFTR,WRBKNRM,LCHSHCP,ACCDNG,DCLVLF, ENJSTM,ABSDDNG,FLTBRD,CHLRNNW,DNGVAL,RCNDSRV,FMLENJ,FMLSTRS, INMDISC,PPLLFCR,SCLMEET, FLTLNL,PPLAHLP,TRTRSP,TRTUNF,FLCLPLA, PPLTRST,PACTLOT).
EXECUTE.

* Subtract 1 for Hungary, as one question was omitted here.

IF (cntry = 'HU') missing = missing-1 .
execute.

* Delete cases where not all data available, and Russia. * This command will remove 9 630 respondents from the file.

FILTER OFF.
USE ALL.
SELECT IF(cntry ~= 'RU' & missing=0).
EXECUTE.

Recoding variables

RECODE
inmdisc (1=2) (2=1).
EXECUTE.
VALUE LABELS inmdisc 1 'No' 2 'Yes'.
 
RECODE
health (1=5) (2=4) (3=3) (4=2) (5=1).
EXECUTE.
VALUE LABELS health 1 'Very bad' 2 'Bad' 3 'Fair' 4 'Good' 5 'Very good'.
 
RECODE
optftr (1=5) (2=4) (3=3) (4=2) (5=1).
EXECUTE.
VALUE LABELS optftr 1 'Disagree strongly' 2 'Disagree' 3 'Neither agree nor disagree' 4 'Agree' 5 'Agree strongly'.
 
RECODE
pstvms (1=5) (2=4) (3=3) (4=2) (5=1).
EXECUTE.
VALUE LABELS pstvms 1 'Disagree strongly' 2 'Disagree' 3 'Neither agree nor disagree' 4 'Agree' 5 'Agree strongly'.
 
RECODE
lfcllk (1=5) (2=4) (3=3) (4=2) (5=1).
EXECUTE.
VALUE LABELS lfcllk 1 'Disagree strongly' 2 'Disagree' 3 'Neither agree nor disagree' 4 'Agree' 5 'Agree strongly'.
 
RECODE
fltdpr (1=4) (2=3) (3=2) (4=1).
EXECUTE.
VALUE LABELS fltdpr 1 'All or almost all of the time' 2 'Most of the time' 3 'Some of the time' 4 'None or almost none of the time'.
 
RECODE
flteeff (1=4) (2=3) (3=2) (4=1).
EXECUTE.
VALUE LABELS flteeff 1 'All or almost all of the time' 2 'Most of the time' 3 'Some of the time' 4 'None or almost none of the time'.
 
RECODE
slprl (1=4) (2=3) (3=2) (4=1).
EXECUTE.
VALUE LABELS slprl 1 'All or almost all of the time' 2 'Most of the time' 3 'Some of the time' 4 'None or almost none of the time'.
 
RECODE
fltlnl (1=4) (2=3) (3=2) (4=1).
EXECUTE.
VALUE LABELS fltlnl 1 'All or almost all of the time' 2 'Most of the time' 3 'Some of the time' 4 'None or almost none of the time'.
 
RECODE
fltsd (1=4) (2=3) (3=2) (4=1).
EXECUTE.
VALUE LABELS fltsd 1 'All or almost all of the time' 2 'Most of the time' 3 'Some of the time' 4 'None or almost none of the time'.
 
RECODE
cldgng (1=4) (2=3) (3=2) (4=1).
EXECUTE.
VALUE LABELS cldgng 1 'All or almost all of the time' 2 'Most of the time' 3 'Some of the time' 4 'None or almost none of the time'.
 
RECODE
fltanx (1=4) (2=3) (3=2) (4=1).
EXECUTE.
VALUE LABELS fltanx 1 'All or almost all of the time' 2 'Most of the time' 3 'Some of the time' 4 'None or almost none of the time'.
 
RECODE
flttrd (1=4) (2=3) (3=2) (4=1).
EXECUTE.
VALUE LABELS flttrd 1 'All or almost all of the time' 2 'Most of the time' 3 'Some of the time' 4 'None or almost none of the time'.
 
RECODE
fltbrd (1=4) (2=3) (3=2) (4=1).
EXECUTE.
VALUE LABELS fltbrd 1 'All or almost all of the time' 2 'Most of the time' 3 'Some of the time' 4 'None or almost none of the time'.
 
RECODE
dclvlf (1=5) (2=4) (3=3) (4=2) (5=1).
EXECUTE.
VALUE LABELS dclvlf 1 'Disagree strongly' 2 'Disagree' 3 'Neither agree nor disagree' 4 'Agree' 5 'Agree strongly'.
 
RECODE
lrnnew (1=5) (2=4) (3=3) (4=2) (5=1).
EXECUTE.
VALUE LABELS lrnnew 1 'Disagree strongly' 2 'Disagree' 3 'Neither agree nor disagree' 4 'Agree' 5 'Agree strongly'.
 
RECODE
accdng (1=5) (2=4) (3=3) (4=2) (5=1).
EXECUTE.
VALUE LABELS accdng 1 'Disagree strongly' 2 'Disagree' 3 'Neither agree nor disagree' 4 'Agree' 5 'Agree strongly'.
 
RECODE
plprftr (1=5) (2=4) (3=3) (4=2) (5=1).
EXECUTE.
VALUE LABELS plprftr 1 'Disagree strongly' 2 'Disagree' 3 'Neither agree nor disagree' 4 'Agree' 5 'Agree strongly'.
 
RECODE
pactlot (1=5) (2=4) (3=3) (4=2) (5=1).
EXECUTE.
VALUE LABELS pactlot 1 'Disagree strongly' 2 'Disagree' 3 'Neither agree nor disagree' 4 'Agree' 5 'Agree strongly'.
 
RECODE
fmlstrs (0=6) (1=5) (2=4) (3=3) (4=2) (5=1) (6=0).
EXECUTE.
VALUE LABELS fmlstrs 1'All of the time' 2 '2' 3 '3' 4 '4' 5 '5' 6 'None of the time'.
 
RECODE
trtunf (0=6) (1=5) (2=4) (3=3) (4=2) (5=1) (6=0).
EXECUTE.
VALUE LABELS trtunf 1 'A great deal' 2 '2' 3 '3' 4 '4' 5 '5' 6 'Not at all'.
 
RECODE
dngval (1=5) (2=4) (3=3) (4=2) (5=1).
EXECUTE.
VALUE LABELS dngval 1 'Disagree strongly' 2 'Disagree' 3 'Neither agree nor disagree' 4 'Agree' 5 'Agree strongly'.
 
RECODE
ppllfcr (1=5) (2=4) (3=3) (4=2) (5=1).
EXECUTE.
VALUE LABELS ppllfcr 1 'Disagree strongly' 2 'Disagree' 3 'Neither agree nor disagree' 4 'Agree' 5 'Agree strongly'.
 
RECODE
flclpla (1=5) (2=4) (3=3) (4=2) (5=1).
EXECUTE.
VALUE LABELS flclpla 1 'Disagree strongly' 2 'Disagree' 3 'Neither agree nor disagree' 4 'Agree' 5 'Agree strongly'.
 
RECODE
jbstrs (0=6) (1=5) (2=4) (3=3) (4=2) (5=1) (6=0).
EXECUTE.
VALUE LABELS jbstrs 0 'All of the time' 1 '1' 2 '2' 3 '3' 4 '4' 5 '5' 6 'None of the time'.
 
RECODE
pdaprp (1=5) (2=4) (3=3) (4=2) (5=1).
EXECUTE.
VALUE LABELS pdaprp 1 'Disagree strongly' 2 'Disagree' 3 'Neither agree nor disagree' 4 'Agree' 5 'Agree strongly'.

Calculate Z-scores for variables

* Calculate combined weight and apply it.

COMPUTE COMWEIGHT = dweight*pweight.
EXECUTE.
WEIGHT BY COMWEIGHT.

* Generate z-scores automatically.

DESCRIPTIVES
VARIABLES= WRHPP ENJLF HAPPY FLTDPR FLTSD STFLFSF STFSDLV STFLIFE LFCLLK FLTEEFF CLDGNG ENRGLOT FLTTRD FLTRSTM HEALTH SLPRL PSTVMS FLRMS OPTFTR WRBKNRM LCHSHCP ACCDNG DCLVLF ENJSTM ABSDDNG FLTBRD CHLRNNW DNGVAL RCNDSRV FMLENJ FMLSTRS INMDISC PPLLFCR SCLMEET FLTLNL PPLAHLP TRTRSP TRTUNF FLCLPLA PPLTRST PACTLOT stfjb stfjbot jbintr jbstrs uempnyr pdaprp
/SAVE
/STATISTICS=MEAN STDDEV MIN MAX.

* Produce component scores.

COMPUTE positive_affect = mean(zwrhpp, zenjlf, zhappy).
EXECUTE.
 
COMPUTE negative_affect = mean(zfltdpr, zfltsd).
EXECUTE.
 
COMPUTE satisfaction = mean(zstflfsf, zstfsdlv, zstflife, zlfcllk).
EXECUTE.
 
COMPUTE emotional = mean(positive_affect, negative_affect).
EXECUTE.
 
COMPUTE vitality = mean(zflteeff, zslprl, zcldgng, zenrglot, zflttrd, zfltrstm, zhealth, zpactlot).
EXECUTE.

* zenrglot not answered by Hungarians. For them, assume zenrglot = 0.

IF (cntry="HU") vitality = mean(zflteeff, zslprl, zcldgng, 0, zflttrd, zfltrstm, zhealth, zpactlot).
EXECUTE.
 
COMPUTE selfesteem = mean(zpstvms, zflrms).
EXECUTE.
 
COMPUTE resources= mean(ZOPTFTR, selfesteem, ZWRBKNRM).
EXECUTE.
 
COMPUTE competence= mean(zlchshcp, zaccdng).
EXECUTE.
 
COMPUTE autonomy= mean(zdclvlf, zenjstm).
EXECUTE.
 
COMPUTE engagement = mean(zfltbrd, zabsddng, zchlrnnw).
EXECUTE.
 
COMPUTE meaning = mean(zrcndsrv, zdngval).
EXECUTE.
 
COMPUTE functionings = mean(meaning, engagement, competence, autonomy).
EXECUTE.
 
COMPUTE Personal_WBI = mean(resources, vitality, satisfaction, emotional, functionings).
EXECUTE.
 
COMPUTE supportive_relations = mean(ZFMLENJ, ZFMLSTRS, zinmdisc, ZPPLLFCR, zsclmeet, zfltlnl).
EXECUTE.
 
COMPUTE trust_belonging = mean(zpplahlp, ztrtrsp, ztrtunf, zflclpla, ZPPLTRST).
EXECUTE.
 
COMPUTE Social_WBI = mean(supportive_relations, trust_belonging).
EXECUTE.
 
COMPUTE Work_WBI =mean (Zstfjb, Zstfjbot, Zjbintr, Zjbstrs, Zuempnyr, Zpdaprp).
VARIABLE LABELS Work_WBI 'Well-being at work, mean of z-scores stfjb, stfjbot, jbintr, jbstrs, uempnyr, pdaprp'.
EXECUTE.

* Delete z-scores for variables (warning – this syntax might not work).

SAVE OUTFILE='ess3_processed.sav'
/DROP zwrhpp TO Zpdaprp.

* Open the dataset with the z-scores deleted.

GET FILE='ess3_processed.sav'.

Other recoded variables

* Re-label old income indicator.

VARIABLE LABEL hinctnt ‘Household total net income, all sources (annual)’.
VALUE LABELS hinctnt
1 ‘Less than €1800’
2 ‘€1800 to under €3600’
3 ‘€3600 to under €6000’
4 ‘€6000 to under €12000’
5 ‘€12000 to under €18000’
6 ‘€18000 to under €24000’
7 ‘€24000 to under €30000’
8 ‘€30000 to under €36000’
9 ‘€36000 to under €60000’
10 ‘€60000 to under €90000’
11 ‘€90000 to under €120000’
12 ‘€120000 or more’.

* Create new income indicator with fewer bands.

RECODE
hinctnt
(1 thru 5=1) (6 thru 8=2) (9=3) (10 thru 12=4) (ELSE=SYSMIS) INTO hinctnt2 .
VARIABLE LABELS hinctnt2 'Household total net income (annual, reduced bands)'.
VALUE LABELS hinctnt2
1 'Less than €18000'
2 '€18000 to under €36000'
3 '€36000 to under €60000'
4 '€60000 or more'.
FORMATS hinctnt2 (F2.0).
EXECUTE.

* Creating aspirations score for SEM exercise.

COMPUTE
intrinsic_extrinsic=mean(mean(imprich,iprspot),mean(ipshabt,ipsuces), mean(ipbhprp,ipfrule))-mean(mean(iplylfr,iphlppl),mean(impenv,ipeqopt,ipudrst),mean(ipcrtiv,impfree)).
EXECUTE.

* Visual Binning.

*Intrinsic_extrinsic.

RECODE intrinsic_extrinsic (MISSING=COPY) (LO THRU 0.666666666666667=1) (LO THRU 1.38888888888889=2) (LO THRU HI=3) (ELSE=SYSMIS) INTO intrinsic_extrinsic_bins.
VARIABLE LABELS intrinsic_extrinsic_bins.
FORMAT intrinsic_extrinsic_bins (F5.0).
VALUE LABELS intrinsic_extrinsic_bins 1 'extrinsic values' 2 'median group' 3 'intrinsic values'.
MISSING VALUES intrinsic_extrinsic_bins ( ).
VARIABLE LEVEL intrinsic_extrinsic_bins (ORDINAL).
EXECUTE.
WEIGHT OFF.

* Add variable labels to recoded and computed variables.

VARIABLE LABELS
comweight 'Combined weight, dweight and pweight multiplied'
positive_affect 'Positive affect, mean of z-scores for wrhpp, enjlf, happy'
negative_affect 'Negative affect, mean of z-scores for fltdpr, fltsd'
satisfaction 'Satisfaction, mean of z-scores for stflfsf, stfsdlv, stflife, lfcllk'
emotional 'Emotional, mean of positive_affect, negative_affect'
vitality 'Vitality, mean of z-scores for flteeff, slprl, cldgng, enrglot (IF HU, enrglot = 0), flttrd, fltrstm, health, pactlot'
selfesteem 'Selfesteem, mean of z-scores for pstvms, zflrms'
resources 'Resources, mean of ZOPTFTR, selfesteem, ZWRBKNRM'
competence 'Competence, mean of z-scores lchshcp, accdng'
autonomy 'Autonomy, mean of z-scores dclvlf, enjstm'
engagement 'Engagement, mean of z-scores fltbrd, absddng, chlrnnw'
meaning 'Meaning, mean of z-scores rcndsrv, dngval'
functionings 'Functionings, mean of meaning, engagement, competence, autonomy'
supportive_relations 'Supportive relations, mean of z-scores FMLENJ, FMLSTRS, inmdisc, PPLLFCR, sclmeet, fltlnl'
trust_belonging 'Trust belonging, mean of z-scores pplahlp, trtrsp, trtunf, flclpla, PPLTRST'
social_wbi 'Social well-being, mean of supportive_relations, trust_belonging'
personal_wbi 'Personal well-being, mean of resources, vitality, satisfaction, emotional, functionings'
intrinsic_extrinsic 'Aspiration score for SEM exercise'
intrinsic_extrinsic_bins 'Recoded aspiration score for SEM exercise'.

*Compute a map-identification code for country.

COMPUTE map=999. IF (cntry ='AT') map=1. IF (cntry ='BE') map=2. IF (cntry ='CH') map=3. IF (cntry ='DE') map=5. IF (cntry ='DK') map=6. IF (cntry ='ES') map=7. IF (cntry ='FI') map=8. IF (cntry ='FR') map=9. IF (cntry ='GB') map=10. IF (cntry ='HU') map=12. IF (cntry ='IE') map=13. IF (cntry ='NL') map=17. IF (cntry ='NO') map=18. IF (cntry ='PL') map=19. IF (cntry ='PT') map=20. IF (cntry ='SE') map=21. IF (cntry ='SI') map=22. IF (cntry ='CY') map=24. IF (cntry ='BG') map=29. IF (cntry ='EE') map=32. IF (cntry ='UA') map=37. IF (cntry ='SK') map=42.
EXECUTE.
FORMATS MAP (F3.0).
VARIABLE LABELS map 'Map identification code for countries'.
VALUE LABELS MAP 1 'Austria' 2 'Belgium' 3 'Switzerland' 4 'Czech Republic' 5 'Germany' 6 'Denmark' 7 'Spain' 8 'Finland' 9 'France' 10 'United Kingdom' 11 'Greece' 12 'Hungary' 13 'Ireland' 14 'Israel' 15 'Italy' 16 'Luxembourg' 17 'Netherlands' 18 'Norway' 19 'Poland' 20 'Portugal' 21 'Sweden' 22 'Slovenia' 24 'Cyprus' 25 'Turkey' 27 'Georgia' 28 'Albania' 29 'Bulgaria' 30 'Island' 31 'Rumenia' 32 'Estonia' 33 'Belarus' 34 'Latvia' 35 'Lithuania' 36 'Moldova' 37 'Ukraine' 38 'Bosnia & Herzegovina' 39 'Croatia' 40 'Serbia and Montenegro' 41 'Russia' 42 'Slovakia' 43 'Macedonia'.
EXECUTE.

 

* Save and open the finished analysis file.

SAVE OUTFILE='ess3_processed.sav'
/DROP=missing.
GET FILE='ess3_processed.sav'.
Go to next page >>