BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello,

In a population of adolescents, I have to compare distribution of Family Affluence Scale (FAS) according to school level (level). I use the FREQ procedure (with chisq option) to do so, and I wonder why SAS does not warn me in the output of expected values under 5.
I know that the chi-square may be valid (because 5 is an empirical choice and is conservative, especially when degrees of freedom and sample size are high, see Agresti "Categorical Data Analysis" for example), but I don't understand why SAS does not warn me. I thought SAS always printed a warning message when expected values were under 5.

Here are the data if you want to try it yourself.

data bonjour;
input FAS$ level$ n;
cards;
1 1 16
2 1 58
3 1 57
1 2 127
2 2 626
3 2 833
1 3 18
2 3 137
3 3 206
1 4 1
2 4 21
3 4 32
1 5 11
2 5 21
3 5 23
;
run;

Any explanation?

Thank you in advance (and pardon my english!)

Gauthier
2 REPLIES 2
Olivier
Pyrite | Level 9
Hi Gauthier.
I do get the Warning message, but only when there more than 20 % cells with expected counts under 5.
See Freq procedure documentation, on the NOWARN option in the TABLES statement :
NOWARN
suppresses the log warning message that the asymptotic chi-square test may not be valid. By default, PROC FREQ displays this log message when more than 20 percent of the table cells have expected frequencies less than five.

Cheers
Olivier
deleted_user
Not applicable
Hi Olivier,

I appreciate your help. I recently updated from SAS v 8.2 to v 9.1 and kept on using SAS 8.2 Documentation! I've just checked the NOWARN option in the SAS 9.1 documentation.

Thank you very much!

Gauthier

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2083 views
  • 0 likes
  • 2 in conversation