-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathSCOTUS_models.R
More file actions
19 lines (15 loc) · 822 Bytes
/
Copy pathSCOTUS_models.R
File metadata and controls
19 lines (15 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
##########################################################
## Program: SCOTUS_models.R ##
## Created by: Robert J. Reynolds, MPH PhD ##
## Description: This program fits a Poisson model to ##
## person-time interval data. ##
## Date created: 15 February 2016 ##
##########################################################
## Define the "Active" variable as a binary
scotus3$active <- (scotus3$retiree-1)*(-1)
## Final published model
summary(m1 <- glm(delta ~ age + year + ChiefJustice +
careerlength + active + offset(log(st)),
family="poisson", data=scotus3))
## Get the MRRs and 95% CIs from the model output
cbind(exp(m1$coefficients),exp(confint(m1,level=0.95)))[-1,]