# Fit a staggered difference-in-differences model
sdid_hosp <- sdid(hospitalized ~ cohort + yr + age + sex + comorb,
df = hosp,
intervention_var = "intervention_yr")
# Summarize the results
summary(sdid_hosp)
Run the code above in your browser using DataLab