Hello everyone,
I am trying to do a DID analysis and difference in rate difference, where the rate is death rate (no of deaths/total number of infections) where death= 1/0
before and after an introduction of a vaccine (timeperiod= 0 is before and 1 is after), where vaccine= 0/1 for two different counties A and B. For county B, the vaccine was never introduced.
I have tried looking this up but most of the examples are based on differences in means. Also since my outcome of interest is death, the population is not the same across two the time periods.
Below is how my dataset looks like
county death infection vaccine timeperiod
A . 1 . 1 . 1 1
B . 1 . 1 0 1
A . 0 . 1 1 1
A . 0 . 1 1 1
B . 0 . 1 0 1
A . 1 . 1 0 0
B 1 1 0 0
Please let me know if more I can clarify this further.
Appreciate your help
Your response mean is a probability (limited to [0,1] range), not a rate that can exceed 1. To properly model a probability, you should either use PROC LOGISTIC or specify the DIST=BINOMIAL option in the MODEL statement in PROC GENMOD. If you want to estimate the difference in difference on the proportion scale, then you should use one of the methods discussed in this note.
Your response mean is a probability (limited to [0,1] range), not a rate that can exceed 1. To properly model a probability, you should either use PROC LOGISTIC or specify the DIST=BINOMIAL option in the MODEL statement in PROC GENMOD. If you want to estimate the difference in difference on the proportion scale, then you should use one of the methods discussed in this note.
Thanks for pointing that Statdave. It makes sense to use dist=binomial in proc genmod to model probability.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Lock in the best rate now before the price increases on April 1.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.