If I have two groups to compare.
One group have 10 persons, and another group have 5 persons.
Then some event happened for those persons, and the event may happen more than once.
If I have 12 events happened for 10 persons group, and 0 event happened for 5 person group. How can I compare the chance which occurring in those two groups?
The problem is I cannot use the exact test because 12 exceeds 10, and I cannot have a negative value for one cell. I don't know if proportion test is feasible, because one of the proportion exceeds 100% while the other is zero.
And my data is the following. a_event is the event occurring in a group, a_total is the total person in a group; the same for b group...
data test;
input a_event b_event a_total b_total;
cards;
12 0 10 5
;
When you have multiple events for an individual, they are not independent and would need some sort of repeated measures test. However, your sample is far too small for any of those tests. You could reframe your response to "a subject had one or more events" and then use the Fisher's Exact Test from PROC FREQ.
Doc Muhlbaier
Duke
Thanks Doc Muhlbaier! For this data, how can I wrote the proc freq for exact test? Thanks!
here is an example that you can adapt
Base SAS(R) 9.2 Procedures Guide: Statistical Procedures, Third Edition
Hi, If I build a 2x2 table, I cannot make one cell negative. The problem is one person can have multiple events....
evenet notevent total
a 12 -2?? 10
b 0 5 5
you have to reframe the question to the people who had events, not how many.
Hi, I have already done that. However, my collaborator still want the multiple counts version.
I guess the statistically proper response is to tell him that he needs abut 10 times the sample sizes to do the correct repeated measures analysis.
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 16. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: