Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining...

40
Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5

Transcript of Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining...

Page 1: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Mark TranmerCathie Marsh Centre for Census and

Survey Research

Multilevel models for combining macro and micro data

Unit 5

Page 2: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Introduction

• We will see how the multilevel model provides a framework for combining individual level survey data with aggregate group level data.

• We illustrate this with an example where individual level data from the European Social Survey are combined with country level data from the Eurostat New Cronos data.

• The dependent variable in our example is voter turnout in the most recent election in their country of residence.

Page 3: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Learning objectives (1)

• To introduce the idea of multilevel modelling• To explain why multilevel modelling is useful

when linking macro and micro data.• To present the kinds of substantive research

questions that can be answered using this approach

• To outline software that permits multilevel models to be fitted.

Page 4: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Learning objectives (2)

• To give an example of linking micro and macro data in the multilevel model framework by combining the ESS micro data with country-level macro data from Eurostat New Cronos

• To briefly outline the various multilevel models in this context

• To explain how interactions between aggregate (macro) and individual level (micro) measures work in these models and why they might answer important substantive research questions.

Page 5: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Levels of analysis and inference

• Traditional regression models are used to carry out an analysis at a single level.

• Such as the individual (person level) with individual level data

• Or at the group (country level) with aggregate data.• If we do an individual level analysis we can make

individual level inferences but, without group level information such inferences may be made out of the context in which the processes occur.

• Sometimes this is referred to the atomistic fallacy• Ideally we want to do the analysis in context

Page 6: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Levels of analysis and inference• We could also do a group (country level) analysis. For

example relating the % voting in each European country with the unemployment rate in that country.

• This would tell us whether countries with higher unemployment tended to have higher (or lower) levels of voter turnout.

• But it wouldn’t tell us whether unemployed people were more (or less) likely to vote than employed people.

• To make such an inference about individuals from a group level analysis would be an example of the ecological fallacy.

• In general the results of analyses carried out at the group level do not apply at the individual level.

Page 7: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Multilevel models• Multilevel models allow us to consider the

individual level and the group level in the same analysis, rather than having to choose one or the other.

• For example we can consider the individual and the country level in the same analysis

• An alternative is to include dummy variables for each of the groups (i.e. countries in the analysis). A so called fixed effects approach.

• However multilevel models have several advantages over this approach:

Page 8: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Multilevel models1. They provide an ideal framework for combining

data from several sources, such as individual level survey data (micro data) and country level aggregate data (macro data).

2. They allow sophisticated hypotheses to be tested without the need to add a lot of extra variables and interactions to the model. E.g. it is relatively straight forward to consider a research question such as this: is the association of age with voter turnout stronger in some countries than others?

Page 9: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Multilevel modelling framework

• The current example involves individual level micro data from the European Social Survey

• And country level aggregate macro data from the Eurostat New Cronos.

• There are basically three ways of fitting multilevel models for voter turnout with these data:

Page 10: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Multilevel modelling framework

1. Models that involve the micro data only2. Models that combine micro data and macro

data and assess the additional impact of the variables from the macro dataset to explain variations in voter turnout

3. Models that interact variables on the micro data and macro data, such as whether or not someone is unemployed (micro data) with the % long term unemployed in the country (macro data).

Page 11: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Multilevel modelling software

• We will use software called MLwiN.

• Although to some extent SPSS can be used for multilevel modelling, MLwiN is more flexible and has better graphics and so on.

• More details of MLwiN at www.cmm.bristol.ac.uk

• MLwiN is being made free to academics

Page 12: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Part 1: multilevel models and ESS micro data

Page 13: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Modelling approaches: theoryModel 1: Single level model – e.g. predicting

chance of voting with age

)|1Pr( iii xyp

ii xpit 10)(log

Page 14: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Modelling approaches: theory

Model 1: Single level model

Page 15: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Modelling approaches: theory

Model 2: null model (multilevel) – getting a sense of where the variation in voter turnout is: between people or between countries

jij uPLogit 00)( 2

0 0)( ujUVar

Page 16: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Modelling approaches: theory

Model 3: Multilevel Model with varying intercepts. Relating age to voting and allowing overall turnout to be

higher/lower in each European country.

jijij uxPLogit 010)( 2|0

)|( xuijoj xUVar

Page 17: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Modelling approaches: theory

Model 3: Multilevel Model with varying intercepts

Page 18: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Modelling approaches: theoryModel 4: Multilevel Model with varying intercepts

and slopes – relationship of age with voting can be stronger/weaker in each country

jj

jijjij

u

uxPLogit

111

010)(

jijjijij uxuxPLogit 0110)(

Page 19: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Model 4: graphical representations

Page 20: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Using MLwiN to read in the data and set up the binomial model

• We will set up a binomial model in MLwiN and estimate some multilevel models (models 2-4) using the ESS micro data only

• We will use an MLwiN worksheet called

Lmmd6.ws

Page 21: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Using Mlwin to read in the data and set up the binomial model

• Open MLwiN by locating it in the programmes listed in the windows start menu or by clicking on the MLwiN icon on your desktop.

• The default worksheet size for this exercise is 5000 cells which is too small to permit the analysis. However, it is easy to increase the worksheet size.

• To do this go to options and make the worksheet 10000 cells (change from 5000). NB: Do not save worksheet when prompted.

• Now choose data manipulation > names

Page 22: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.
Page 23: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Setting up the model in MLwiN

Page 24: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Setting up the model in MLwiN

Page 25: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Setting up the model in MLwiN

Page 26: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Setting up the model in MLwiN

Page 27: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Setting up the model in MLwiN

Page 28: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Null model (model 2) is now set up

Page 29: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Estimation type

Page 30: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Model 2 results

Page 31: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Model 3: results – add cent_age to model by clicking on ‘add term’

Page 32: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Model 4: set up

Page 33: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Model 4: results

Page 34: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Part 2: combining macro and micro data in multilevel models

Page 35: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Combining data in mulitlevel models: model 5 – Main effects

Model 5: combining survey and aggregate data.

),|1Pr( jijijij Xxyp

jjijij uXxPLogit 0210)(

2,|0

),|( Xxujijoj XxUVar

Page 36: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Combining data in mulitlevel models: model 6 – interactions

),|1Pr( jijijij Xxyp

jjijjijij uXxXxpLogit 03210)(

2,|0

),|( Xxujijoj XxUVar

Page 37: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Model 5 main effects: results

Page 38: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Model 6 Interactions: results

Page 39: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Summary: what you have learnt in this session

1. The multilevel model is an extremely useful framework for combining macro and micro data

2. Multilevel logistic regression models can be used for an outcome with two categories such as voter turnout

3. We can then fit a series of models to extent the nature and extent of individual and country level variations in voter turnout. We can use software such as MLwiN to do this.

Page 40: Mark Tranmer Cathie Marsh Centre for Census and Survey Research Multilevel models for combining macro and micro data Unit 5.

Summary: what you have learnt in this session

4. We can then estimate multilevel models with ESS micro data only

5. We can then combine micro and macro data by adding variables from Eurostat New Cronos to model

6. Finally we can also interact individual level ESS variables with country level variables from new Cronos data