I have run PROC GENMOD to obtain IRRs for two sets of incidents.
Event A year estimate is 0.2445, standard error 0.04648, IRR 1.27692. Crude rate went from 2.27 per million to 12.63 per million over 7 years.
Event B year estimate is -.01152, standard error 0.05574, IRR 0.89118. Crude rate went from 15.3 per million to 6.17 per million over the same period.
Is there a test which allows me to compare the IRRs or the growth in the 2 crude rates over time?
Thanks in advance.
I just provided an answer to this post which sounds essentially identical to yours.
Thanks for responding.
Here's my code, tailored (I think) to yours. Crude rate dividend is the same for both incidents ("Visits"):
DATA NPS;
INPUT Year Visits EFG STU;
YearIndx = Year-2012;
LogVisits = Log(Visits/1000000);
Event=1; Incident=EFG; Rate=EFG/(Visits/1000000); OUTPUT;
Event=0; Incident=STU; Rate=STU/(Visits/1000000); OUTPUT;
DATALINES;
2013 273630895 4187 620
2014 292800082 5498 796
2015 307247252 6160 1283
2016 330971689 6753 3196
2017 330882751 6605 3114
2018 318211833 6111 3214
2019 327516619 2820 2976
2020 237064332 1463 2993
;
PROC SGPLOT data=NPS;
scatter y = Rate x = year / Group=Event;
series y = Rate x = year / Group=Event;
RUN;
I'm having an issue trying to duplicate your GENMOD code with this dataset - not sure what type of transformation, if any, I should try here.
Thanks for your help!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.