Limited Dependent Variables: Binary Models
description
Transcript of Limited Dependent Variables: Binary Models
1
Limited Dependent Variables:Binary Models
Erik NessonBall State University
MBSW 2013
2
Outline
1. Overview of LDVs2. Binary Outcome Models
a. Linear Probability Modelb. Logit and Probit
3. Interpretation of Coefficientsa. Odds ratios vs. marginal effectsb. Implementation in Stata
3
Binary Outcome Models
• Dependent variable takes values of 0 or 1• Model of interest is probability that y=1
conditional on independent variables
Here represents matrix of covariates and represents vector of coefficients
• Examples Is a person obese? Does a person smoke? Does a
person contract a disease?
4
Example: Secondhand Smoke• Half of adult non-smokers are exposed to environmental
tobacco smoke (ETS)• Main point of public policies is to reduce ETS exposure in
specific areas Ex: smokefree air laws are meant to reduce ETS exposure at
work• But most research about tobacco control policies focuses
on reducing smoking• Main question:
Do tobacco control policies reduce ETS exposure in the workplace?
5
How to measure ETS exposure?
• NHANES Dataset Repeated cross-section dataset covering 1988-1994 and
1999-2004 Roughly 10k individuals interviewed every year All individuals complete extensive survey AND receive
physical Contains extensive demographic and health history
information• Sample
Non-smoking, employed individuals age 18 to 65 8,554 individuals
6
Dependent and Independent Variables
1. Indicators of ETS Exposurea. Q: “… how many hours per day can you smell the smoke
from other people’s cigarettes, cigars, and/or pipes?”b. Serum cotinine levels
• Cotinine is major metabolite of nicotine with 8-16 hr half life• Very low levels can be detected
2. Tobacco Control Policies a. Cigarette Taxes measured in real $2009b. The percent of each individual’s state living under a
workplace SFA law (from 0 to 100)
7
Summary StatisticsAll Workers
(N=8554)White Collar Workers
(N=4825)Blue Collar Workers
(N=3729)Mean Std. Dev. Mean Std. Dev. Mean Std. Dev. T-Test
Smell Smoke at Work 0.818 2.126 0.536 1.717 1.388 2.686 0.000Observable Cotinine Level 0.629 0.483 0.572 0.495 0.746 0.435 0.000Cigarette Excise Tax 1.265 0.644 1.267 0.633 1.262 0.666 0.834Female 0.502 0.500 0.587 0.492 0.330 0.470 0.000Age 41.260 12.955 41.625 12.624 40.522 13.571 0.007Black 0.102 0.303 0.092 0.290 0.121 0.327 0.000Hispanic 0.117 0.321 0.074 0.262 0.203 0.402 0.000Married 0.658 0.474 0.664 0.472 0.646 0.478 0.248Income to Poverty Ratio 3.236 1.639 3.572 1.556 2.559 1.591 0.000B.A. Degree 0.328 0.469 0.446 0.497 0.089 0.285 0.000Some College 0.307 0.461 0.316 0.465 0.290 0.454 0.105H.S. Degree 0.242 0.429 0.192 0.394 0.343 0.475 0.000Less than H.S. 0.122 0.328 0.045 0.208 0.278 0.448 0.000Family Size 3.145 1.514 3.003 1.407 3.431 1.674 0.000Rooms in Home 6.334 2.116 6.566 2.189 5.866 1.877 0.000
8
Self-Reported ETS Exposure at Work by Job Category
No Yes0
10
20
30
40
50
60
70
80
90
Any Secondhand Smoke Exposure
Perc
ent
White Collar Jobs
Blue Collar Jobs
Total
Notes:Data from NHANES III and NHANES 1999/2000 - NHANES 2003/2004.
9
Tabulation of Observable Cotinine Levels by Job Category
No Yes0%
10%
20%
30%
40%
50%
60%
70%
80%
Any Secondhand Smoke Exposure
Perc
ent
White Collar Jobs
Blue Collar Jobs
Total
Notes:Data from NHANES III and NHANES 1999/2000 - NHANES 2003/2004.
10
Basic Model
• Basic model estimates exposure to ETS as a function of tobacco control policies, individual characteristics, other geographic characteristics:
TC: tobacco control policies X: individual characteristics Z: geographic characteristics and : state and time fixed effects
• Main coefficients of interest:
11
Linear Probability Model
• Assume conditional probability is linear in
• Upsides to LPM Easy to run: run a linear regression:
Interpretation is easy!
• In words, “Every unit increase in is associated with a percentage point change in the probability that y=1.”
Prediction is easy!
12
Binary Outcome Models
• Downsides to LPM may not be linear Predicted probability does not need to be
between 0 and 1 Constant marginal effect may not be reasonable!
13
Linear Probability Results
• Table shows marginal effects with standard errors in parentheses
Self-Reported Exposure Observable Cotinine Levels
All Workers
White Collar
WorkersBlue Collar
Workers All Workers
White Collar
WorkersBlue Collar
WorkersCigarette Excise Tax 0.035 0.055* 0.021 0.019 0.015 0.026
(0.03) (0.03) (0.07) (0.03) (0.04) (0.05)Work SFA Law -0.001* 0.000 -0.002*** -0.002*** -0.003*** -0.001
(0.00) (0.00) (0.00) (0.00) (0.00) (0.00)
14
Logit or Probit
• Assume that is a function such that for any value of As and as
• For Logit • For Probit
Note: is the standard normal CDF
15
Interpretation of Coefficients
• Continuous variable: If then what is marginal effect, i.e. ? Using some calculus:
• Where is the density function associated with Some notes:
1. doesn’t only depend on 2. What values of should we use?3. Marginal effect isn’t constant like in linear
probability model
16
Interpretation of Coefficients
• Discrete variable: If then marginal effect of increasing from 0 to 1 =
Some notes:1. Again, marginal effect doesn’t only depend on 2. What values of should we use? 3. Marginal effect isn’t constant like in linear probability
model
17
Calculating Marginal Effects
• For both continuous and discrete variables, other coefficients and variable values enter into marginal effects calculation
• Three common approaches:1. Marginal effect at the mean: Use mean values of
other variables2. Average marginal effect: Calculate marginal effect
for each observation3. Marginal effect at some other value of coefficients
18
Calculating Marginal Effects
• Calculating marginal effect at the mean for Continuous coefficient• Find by plugging in mean values for • Multiply by
Discrete coefficient• Find when by plugging in mean values for and 1 for • Find when by plugging in mean values for and 0 for • Subtract two values
19
Calculating Marginal Effects
• Calculating average marginal effect for Continuous coefficient• Find for each observation and multiply by • Find mean value for all observations
Discrete coefficient• Find when for each observation• Find when for each observation• Subtract two values for each observation• Find mean value for all observations
20
Implementation in Stata
• Code for estimating marginal effect at the mean in Stata: logit y x margins, dydx(varlist) atmeans
• Code for estimating average marginal effect in Stata: logit y x margins, dydx(varlist)
• Usually Stata is smart enough to determine which independent variables are binary
21
Odds Ratios
• Common in other fields to run a logit model and report an odds ratio
• What are odds? Odds of an event =
• The odds ratio
• Odds ratio>1: event is more likely to happen• Odds ratio<1: event is less likely to happen
22
Odds Ratios and Logit
• How do Odds Ratios work in Logit? Odds given :
• Note:
Similarly, odds given :
• Note:
23
Odds Ratios and Logit
• Then Odds Ratio = Plugging in:
• Quick notes about the odds ratio1. Odds ratio does not depend on other coefficients
or independent variables2. May be difficult to translate into policy3. Odds ratios are very easy to compute! Simply
exponentiate coefficients
24
Odds Ratios and Logit
• What does an odds ratio of 2 mean? Odds of y=1 are 2x greater when x=1 than when x=0 Could be that
• Odds that y=1|x=1 = 4 and odds that y=1|x=0 = 2• Odds that y=1|x=1 = 3 and odds that y=1|x=0 = 1.5• Odds that y=1|x=1 = 2 and odds that y=1|x=0 = 1
• So odds ratios are not equal to marginal effects• Do not tell us about differences in probability
25
Odds Ratios and Marginal Effects
• Some notation: Odds that
Odds Ratio
Marginal Effect
0.05 0.10 0.05 0.11 2.11 0.050.10 0.15 0.11 0.18 1.59 0.050.50 0.55 1.00 1.22 1.22 0.050.80 0.85 4.00 5.67 1.42 0.050.90 0.95 9.00 19.00 2.11 0.05
26
Logit Results
• Table shows odds ratios, standard errors in parentheses, and marginal effects in brackets
Self-Reported Exposure Observable Cotinine Levels
All WorkersWhite Collar
WorkersBlue Collar
Workers All WorkersWhite Collar
WorkersBlue Collar
WorkersCigarette Excise 1.226 1.447 * 1.127 1.008 1.000 1.043Tax (1.17) (0.79) (3.49) (0.02) (0.05) (0.02)
[0.030] [0.039] [0.027] [0.001] [0.000] [0.003]Work SFA Law 0.993 *** 0.995 0.988 *** 0.990 *** 0.987 *** 0.997
(-0.32) (-0.86) (-0.38) (0.00) (0.00) (0.00)[-0.001] [-0.001] [-0.003] [-0.002] [-0.002] [-0.000]
27
Other Issues
• Standard errors are complicated Be wary of canned programs (like Stata!) which
allow calculation of robust variance/covariance matrices.
• Interaction terms are also complicated Odds ratios can be difficult to interpret Marginal effects are better!