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
- /
- Analytics
- /
- Stat Procs
- /
- PROC FREQ and non-integer frequencies

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

04-30-2013 10:27 AM

Hi,

I would like to perform Chi-square and Fisher exact test on a simple contingency table. If I use for instance the following code:

data yesno;

input gender $ numyes total;

response="Yes"; count=numyes; output;

response="No "; count=total-numyes; output;

datalines;

Men 0 100

Women 45.2 100

;

proc freq data=yesno;

weight count;

table gender * response / chisq fisher;

run;

I obtain the following "WARNING: Fisher's exact test is not computed because of non-integer frequencies."

Do you have an idea how to proceed?

Thanking you in advance for your answer.

Best,

Accepted Solutions

Solution

04-30-2013
11:08 AM

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

04-30-2013 11:08 AM

For a true comparison you need the true denominator, not 100.

All Replies

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

04-30-2013 10:57 AM

Well, the log is correct, you can't have a decimal in contingency tables, because they're counts.

Can you explain some more about what you're trying to do?

It looks like you have 2 percentages and want to compare them, so you've put them over 100. You could put it out of 1000 to remove the decimal but that can change the results.

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

04-30-2013 11:02 AM

Hi Reeza, thanks for your prompt reply. To be more precise, I try to compare two (or more) percentages. A more concrete case. I have the following percentages to compare: 7.5, 6.2, 5.3 and 9.9.

Solution

04-30-2013
11:08 AM

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

04-30-2013 11:08 AM

For a true comparison you need the true denominator, not 100.

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

04-30-2013 11:21 AM

Did you mean

weight **total** ;

Ksharp

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

05-03-2013 08:20 AM

Thanks a lot for your answer!

@Ksharp: it is well "weight count";