BookmarkSubscribeRSS Feed
kp19
Fluorite | Level 6

I want to compare disease incidence rates between age groups over time. We are trying to see if the incidence rates increased/decreased over time differently between multiple age groups. I have monthly counts for a disease and underlying population for each age group. Can I use proc genmod with poison distribution and log of population as offset with interaction between time and age group?

Is there a way to compare differences in rates between two time period using the poison regression?

For eg, In March 2018 the rate difference between two age group was 10 but in Sep 2018 the rate difference was 30. What is the best approach to analyze this data?

3 REPLIES 3
Ksharp
Super User
If your data is 2*2 contingency table .Try PROC FREQ.

proc freq data=have;
table a*b/relrisk ;
run;

@Rick_SAS wrote a blog about it before.
StatDave
SAS Super FREQ

Yes, you can use your Poisson model with offset in GENMOD. But to get the difference in difference estimate on the probability (incidence rate) scale, you will need to use the NLMeans macro as described in the second part of this note. The following uses the Poisson example in the Getting Started section of the GENMOD documentation and estimates the difference in difference to see if the response rate is the same at each age for the large and small car sizes.

proc genmod data=insure;
where car in ('large','small');
class car age;
model c = car|age / dist=poisson  offset=ln;
lsmeans car*age / e ilink plots=none;
ods output coef=coeffs;
lsmestimate car*age "Diff in Diff Log Probs" 1 -1 -1 1;
store fit;
run;
data difdif;
   input k1-k4;
   set=1;
   datalines;
   1 -1 -1 1
   ;
%NLMeans(instore=fit, coef=coeffs, link=log, contrasts=difdif,
         title=Difference in Difference of Means)

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 3 replies
  • 774 views
  • 0 likes
  • 3 in conversation