Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- year - observation year
- state - state (FIPS code)
- legal1820 - percentage of 18-20 year olds who can legally drink
- dtype - death cause (4 types)
- pop - state population
- mrate - mortality rate per 100,000/year
- mortality rate = α+ δDDLEGALst + βSTATEs + γYEARt + εst
- DDLEGALst - proportion of 18-20 year olds that can drink in state s at time t
- STATEs is the dummy variable for each state
- YEARt is the dummy variable for each year
- εst - error term
- deathall <- subset(mlda_data, mlda_data$dtype == 1)
- deathmotor <- subset(mlda_data, mlda_data$dtype == 2)
- deathsuicide <- subset(mlda_data, mlda_data$dtype == 3)
- deathinternal <- subset(mlda_data, mlda_data$dtype == 6)
- deathall$statedummy = ifelse(deathall$legal1820 < 100, 1, 0)
- deathall$yeardummy = ifelse(deathall$legal1820 < 100, 1, 0)
- deathall$did = deathall$statedummy * deathall$yeardummy
- deathall_baseline = lm(mrate ~ statedummy + yeardummy + did, data = deathall)
- > summary(deathall_baseline)
- Call:
- lm(formula = mrate ~ statedummy + yeardummy + did, data = deathall)
- Residuals:
- Min 1Q Median 3Q Max
- -88.214 -24.803 -6.004 14.797 191.199
- Coefficients: (2 not defined because of singularities)
- Estimate Std. Error t value Pr(>|t|)
- (Intercept) 130.014 2.302 56.478 < 2e-16 ***
- statedummy 10.674 2.966 3.598 0.000343 ***
- yeardummy NA NA NA NA
- did NA NA NA NA
- ---
- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
- Residual standard error: 38.79 on 712 degrees of freedom
- Multiple R-squared: 0.01786, Adjusted R-squared: 0.01648
- F-statistic: 12.95 on 1 and 712 DF, p-value: 0.0003425
- deathall_statepop = lm(mrate ~ statedummy + yeardummy + pop + state + did, data = deathall)
Add Comment
Please, Sign In to add comment