Contributor
Posts: 20

# compare two groups

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
;

Posts: 2,125

## Re: compare two groups

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

Contributor
Posts: 20

## Re: compare two groups

Thanks Doc Muhlbaier!  For this data, how can I wrote the proc freq for exact test?  Thanks!

Posts: 2,125

Contributor
Posts: 20

## Re: compare two groups

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

Posts: 2,125

## Re: compare two groups

you have to reframe the question to the people who had events, not how many.

Contributor
Posts: 20

## Re: compare two groups

Hi, I have already done that.  However, my collaborator still want the multiple counts version.