BookmarkSubscribeRSS Feed
tmtemples
Fluorite | Level 6

I'm comparing infection rates per 1000 device days for two sets of data.  I want to determine whether a new treatment reduced the infection rate. 

 

My question is how to compare the RATES?  The mean rate should be calculated as sum(all infections)/sum(all device days), NOT just the mean of the monthly rates.  But I am not sure how to perform a Wilcoxon test and report the results using the rates.

 

I originally ran the test on the number of monthly infections, but decided the rate would be more appropriate because the number of device days varies widely each month.  However, when I run the test on the rates, the mean is calculated by averaging the rates. 

 

any suggestions is greatly appreciated.

9 REPLIES 9
Rick_SAS
SAS Super FREQ

One approach is to use PROC GENMOD to model the rates and include the grouping variable as a CLASS variable. You can then use the LSMEANS statement to estimate the ratio between the two groups. If the confidence interval for the rate ratio includes 1, then the data indicate that the group rates are not significantly different. if the CI does not include 1, you can conclude a difference in rates.

 

There is a SAS Knowledge Base article that has data, example code, and a discussion. It uses a Poisson model for the rates, but you can also use a negative binomial or another model.

 

I think most researchers use the ratio of rates to do the comparison, but if for some reason you need to test the DIFFERENCE in rates, you can do that too.

tmtemples
Fluorite | Level 6
thank you!
SAS-questioner
Obsidian | Level 7
Do you think it's necessary to put the numerator of the rates in the model as the weight? For example, 40% in one group might result from 4/10, but 30% in other group might result from 30/100?
Rick_SAS
SAS Super FREQ

Yes. The denominator is used when you model rates. But you should not use a WEIGHT variable. Instead, use an OFFSET variable. The KB article that I linked to contains details and an example.

SAS-questioner
Obsidian | Level 7
Thank you so much! Do you know what's this test called? Is it a binomial test? Or just the logistic regression?
SAS-questioner
Obsidian | Level 7

Hi Rick, I am wondering if there is a two-level involved, does proc genmod can model the random effect? 

For example, there are 50 stores in county X, 30 out of the 50 stores have product A, and 20 out of the 50 stores have product B. And then I find out how many people (with certain feature) within county X need product A (N), and how many people (with certain feature) within county X need product B(n). And I want to compare the rate like: 30/N vs 30/n. And there are multiple counties, not just an X. Is it appropriate for PROC GENMOD? And is it multilevel modeling? Thank you!

Rick_SAS
SAS Super FREQ

Please create a new thread with your question, rather than using this thread from 2016.

SAS-questioner
Obsidian | Level 7
OK, I will create an new one, thank you!
Doc_Duke
Rhodochrosite | Level 12

This may fit into the class of data considered 'rare events'.  SAS/QC recently added PROC RAREEVENTS to produce Shewhart control charts using the hypergeometric distribution.  Though not a statistical comparison per se, the graph may be able to illustrate the difference much better than a p-value.

 

The most recent SUGI proceedings had a nice article on it.

http://support.sas.com/resources/papers/proceedings16/SAS4040-2016.pdf

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 9 replies
  • 3378 views
  • 0 likes
  • 4 in conversation