About this Resource

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.

Download lmmd6.ws

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:

  1. Open the individual level data file and choose data > merge cases > add variables.
  2. Select the aggregate data file as data to be merged.
  3. Choose the key variable (the group level id).
  4. 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.

The University of Manchester; Mimas; ESRC; RDI

Countries and Citizens: Unit 5 Multilevel modelling using macro and micro data by Mark Tranmer, Cathie Marsh Centre for Census and Survey Research is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales Licence.