Hello!
I'm having a bit of trouble getting RR from a Poisson model using count data and with interaction terms. I have data like this:
data x;
count time intervention status totalcount;
12 1 1 0 21
34 2 0 0 40
12 3 0 1 20
15 4 1 1 20
16 5 0 1 21
run;
*Note: Count is number of patients hospitalized, and total count is total patients.*
I'm interested in knowing how the intervention affected the count, and also how it differed by status so I ran this model.
proc genmod data=x;
class status intervention/param=glm;
model count= time intervention status status*intervention intervention*time/dist=poisson offset=log_tc;
run;
*log_tc*= I took the log of the total count*
I get the coefficients from this output but I want to be able to interpret my output in terms of risk ratios/rate ratios.
However, using the estimate statements/LSMeans does not exactly work in this situation and I'm not sure what to do to get it since I have interaction terms in my model.
If I had just main effect terms in the model, I would take the exponents of the coefficients, but with interaction terms how would I get the estimates? and interpret all of them, including the interactions?
For instance I want to know how the count varied by status (=1) where intervention=1.
I would appreciate any guidance on this!
Your response is apparently binary and then aggregated, resulting in a count of events out of a total count of trials. As such you can simply fit a logistic model using "events/trials" syntax for specifying the observed counts. You can then obtain the risk ratio (relative risk) using the NLMEANS macro as discussed and illustrated in this note.
Moved to STATS forum.
Your response is apparently binary and then aggregated, resulting in a count of events out of a total count of trials. As such you can simply fit a logistic model using "events/trials" syntax for specifying the observed counts. You can then obtain the risk ratio (relative risk) using the NLMEANS macro as discussed and illustrated in this note.
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.