The data has been prepared for this exercise as lmmd6.ws (the .ws suffix indicates an MLwiN worksheet which contains the data). N.B. If MLwiN has been used to fit some models, and the worksheet is then saved, these model results will also be contained in the worksheet -this is useful for saving results of previous analyses.
To merge individual and group level data in SPSS each dataset to be merged must have a group level id. In our case the ESS has a country code and there is then one row of aggregate country level data from the Eurostat New Cronos. In our example the ESS data (a 10% sub sample of the original dataset) contains 3362 cases and the Eurostat New Cronos contains 20 rows -one of each country that is common to both ESS and Eurostat New Cronos.
To merge files in SPSS:
- Open the individual level data file and choose data > merge cases > add variables.
- Select the aggregate data file as data to be merged.
- Choose the key variable (the group level id).
- Select 'external file is keyed table'.
The resulting data file should then contain all the individual level data and the values of the aggregate data for each individual are then added as new columns in the data file. Every individual in a particular country has the same value of these aggregate variables.
In this activity you will build a multilevel model using MLwiN and data from The European Social Survey and Eurostat New Cronos. You will need to make sure that the MLwiN software is installed on your on your computer before you start this exercise.