Presentation is loading. Please wait.

Presentation is loading. Please wait.

Drop-in Sessions! When: Hillary Term - Week 1 Where: Q-Step Lab (TBC) Sign up with Alice Evans.

Similar presentations


Presentation on theme: "Drop-in Sessions! When: Hillary Term - Week 1 Where: Q-Step Lab (TBC) Sign up with Alice Evans."— Presentation transcript:

1 Drop-in Sessions! When: Hillary Term - Week 1 Where: Q-Step Lab (TBC) Sign up with Alice Evans

2 Political Analysis 2, Week 8, Lab 7
Logistic Regression Political Analysis 2, Week 8, Lab 7

3 Recap Linear regression models are useful for approximating many relationships between variables. Ex: 1. The effect of foreign aid on GDP p.c. (Easterly 2003) Ex: 2. The effect of democracy on trade liberalization (Milner & Kubota 2005) But some relationships violate the assumption of linearity, i.e., the marginal effect of X (our IV) on Y (our DV) is not constant. Exponential Logarithmic Cubic Quadratic

4 Transforming variables
Recall from last week… Non-linear relationships between X and Y can be modelled by transforming X . Ex: Y= B0 + B1*X + B2*X2 + B3*logeZ

5 Changing the model Another option at our disposal is to change the statistical model to better estimate the relationship between Xs and Y. The model we choose will depend on the nature of our variables Focus for today: the dependent variable is binary (Y=0 or Y=1) Variable Y=1 Y=0 Legislation bill passes bill fails Conflict war peace IO participation member not a member Climate change support signatory to Paris non-signatory to Paris Legislative influence party in majority party not in majority Civil war onset no onset

6 Changing the model: LPM
Some options: OLS Linear Probability Model Assumptions of ordinary least squares apply e.g., DV is a linear function of the IVs; normal distribution of errors; etc. But DV is modelled differently! Y = Pr(event occurring) Pr 𝑌 = 1 = 𝑏 0 + 𝑏 1 𝑋 1 + 𝑏 2 𝑋 2 +𝑒 Beta interpretation is straightforward!: change in Pr(Y = 1) following a one-unit change in X, holding all other independent variables constant

7 Changing the model: Logit
Some options: 2. Logistic regression While OLS models the relationship btw IVs and the DV as a straight line (with predicted Ys btw -∞ and +∞)… logistic regression models the relationship as a smooth curve (with predicted Ys btw 0 and 1). Logit models allow us to assume a certain king of nonlinear relationship btw the IVs and the Pr(Y=1)

8 Linear to logistic Some drawbacks of LPM
Potential for out-of-bound predictions (recall Olympic 100 m sprint example) Non-normality of errors (binomial instead), which can invalidate t-tests Heteroscedasticity (variance of residuals is not constant

9 Probability and odds Logistic regression allows us to determine the likelihood of an outcome as measured by the probability or odds it occurs Probability (Pr) Range is 0 to 1 Pr(Y=1) + Pr(Y=0)) = 1 Ex: If the probability of Art. 50 being invoked in 2017 is 20% (.2) then the probability of Art. 50 not being invoked is 80% (.8) Odds Range is 0 to +∞ Odds is equal to Pr(Y=1)/Pr(Y=0) or Pr(Y=1)/1-Pr(Y=1) Ex: Odds of invoking Art. 50 in 2017 are .2/.8 = .25 = the odds of Art. 50 being invoked are 1:4.

10 Probability and odds Range: 0 to +∞ Range: 0 to 1 The relationship between odds and probability is monotonic. As odds , probability , and vice versa

11 Logistic regression The left side of our logistic regression equation represents the “logit.” The logit is the transformation of Y from odds to the log of odds. (This log transformation is also monotonic.)

12 Logistic regression cont.
How to interpret logit coefficients? Log of odds ratio Means a one-unit increase in β (warl) reduces the log of odds ratio for civil war onset by

13 Interpreting logit coefficients
To interpret logit coefficients, we have two options: 1. Log of odds ratio  (conditional) odds ratio Take the coefficient’s exponential and subtract from 1 Gives us the percentage change in odds following a one-unit increase in X 2. Generate predicted probabilities (focus of today) Specify range of values for an IV of interest Specify constant values for non-predicted IVs Store in a dataframe  predict() Probabilities from 0 to 1

14 Interpreting logit coefficients cont.
Critically… …whether coefficients are interpreted using odds or probabilities… ...the marginal effect of any independent variable depends on the value of that independent variable as well as the values of other covariates in the model.

15 Evaluation Please take a few minutes at the end of class to evaluate this term’s lab!


Download ppt "Drop-in Sessions! When: Hillary Term - Week 1 Where: Q-Step Lab (TBC) Sign up with Alice Evans."

Similar presentations


Ads by Google