# multilevel binary logistic regression

Post on 16-Apr-2017

565 views

Category:

## Government & Nonprofit

Embed Size (px)

TRANSCRIPT

• Eduard Ponarin Veronica Kostenko

Boris Sokolov

Multilevel binary logistic regression

Lecture 3

• The basic logistic regression

X on Y in case of a binary outcome.

For example, if a candidate won or not during the elections, Y is either 0 or 1). Here X stands for the money spent on the campaign, Y the outcome.

• Plotting X against proportion of successes

Where ni stands for the number of observations at X = h.

• Why not a linear model for probabilities?

Linear approximation is problematic in this case because:

a) Residuals are non-randomly distributed

b) 0.2 < p < 0.8 is distributed otherwise then the tails of the function (p < 0.2; p > 0.8)

c) Regression line should fall into the interval between 0 and 1 which is hard to fit for a linear model

Estimated probabilities should be transformed into logits

• Transformation of probabilities into logits

• Plotting logit functions

Increasing logit function Decreasing logit function

• Plotting probabilities for a single level logistic regression

• Multilevel logistic regression formula

logit (Pr (Yi=1)) = j + i = 00 + 0j + i

logit (Pr (Yi=1)) = j + gender * gender + age * age + i.

j = 00 + 0j

• Script for a simple model

M1

• Output for a logistic multilevel regression

Coefficients shouldnt be interpreted as in linear models, they should be transformed (exponential or divided-by-4 rule)

Signs of the coefficients stay the same

Coefficients can be compared with each other

• Output for a simple model

• Adding 1st level interaction

M2

• Summary with interaction

• Varying intercepts and slopes without group level predictor

M3

• Summary with varying slope

• Adding a group-level predictor

M4

• A model with between-level interaction