turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- compare two groups

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-30-2013 10:02 AM

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

;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-30-2013 10:08 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-30-2013 10:15 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-30-2013 10:28 AM

here is an example that you can adapt

Base SAS(R) 9.2 Procedures Guide: Statistical Procedures, Third Edition

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-30-2013 10:38 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-30-2013 10:42 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-30-2013 10:45 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-05-2013 10:19 AM

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.