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.
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.
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.
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!
Please create a new thread with your question, rather than using this thread from 2016.
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
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.