We can think of hierarchical/multilevel models as a way to partition and leverage variation at different levels.

We begin to will work on cross-sectional time-series data on MEPs in the 2012-2017-period.

#libraries
library(lme4) #hierarchical models
library(stargazer) #regression tables
library(dplyr) #data wrangling + pipes
library(ggplot2) #graphics

#download
download.file(url = "https://siljehermansen.github.io/teaching/beyond-linear-models/MEP.rda",
              destfile = "MEP.rda")

#Load in
load("MEP.rda")

#Rename the data for convenience
df <- MEP

We will work on an unbalanced panel data (the same as in the R notebook). Each Member of the European Parliament (MEP) is observed every 6th month in the 2012-2017 period (identified as ID).

This time, we’re interested in whether MEPs use their parliamentary resources for electoral purposes. There are two empirical implications of this:

Our dependent variable is the local staff size of each MEP: ShareOfLocalAssistants.

Exercise 1: Descriptive statistics

Let’s start by exploring the data structure.

  1. What is the size of the data? How many individual MEPs are there in the data set? How often are they observed?

  2. How is the relevant variation here? How are the variables measured? What is the within-group and between group variation?

  3. How could I model this? What would be the advantages and drawbacks? I.e. what variation would I leverage?

Exercise 2: Choice of covariates

  1. I want to model the change in staff size as a function of the electoral calendar. How can I do this?

  2. I’m considering a fixed-effects model at the individual level. Please advise me on the following covariates:

    • electoral calendar
    • electoral system
    • labor cost (LaborCost)
    • gender (Female)
    • age (Age)
    • lag of the dependent variable (ShareOfLocal.lag)
  3. Now, I’m considering a fixed-effect on time-period. Would this be a good idea? What would be the effects of my two election variables? (EPElection; ProxNatElection).

  4. How do you think the random-effects model would perform here?

Exercise 3: Fit and interpret the model

  1. Fit the following model as a pooled linear regression, fixed-effects model and a random effects model (with varying individual intercepts): ShareOfLocalAssistants ~ ProxNatElection + NationalCandidateCentered + EPElection + OpenList + ShareOfLocal.lag. Present the results in stargazer().

  2. What do you find? What happened?

  3. Discuss my choice of variables.

Exercise 4: Interpretation

Interpret the results from the random-effects model.

What is the effect of the two measures of the electoral calendar and the electoral system?

  1. Create two scenarios and interpret either the marginal effect or the first-difference. Justify your choice.

  2. Descriptive statistics from a survey conducted among MEPs shows that some 31% claim that they envision staying in Parliament for 10 or more years (i.e. they will seek reelection). How does this change your understanding of the results?

  3. Illustrate the effects. What plot would you opt for?

  4. In your opinion, are the two hypotheses supported? How big are the electoral incentives?

Exercise 5: Interaction effect

I have a third hypothesis: I believe MEPs with higher incentives to cultivate a personal vote are more sensitive to the electoral calendar.

  1. How could I model this?

  2. Can you implement your suggestion using a random-intercept model?

  3. Can you interpret the results following the Berry et al.s recommendation?

What is the effect of:

Literature