BookmarkSubscribeRSS Feed
sumah
Fluorite | Level 6

ewewee.png

2 REPLIES 2
sumah
Fluorite | Level 6
I have run a Ch-sqaures test on these variables. that was the SAS output categories for both variables are (yes vs no). why another row (No) didn't show in the table? Can I run chi-squares if one variable has 0 obs in one category?
SASKiwi
PROC Star

Most likely you will see something like this in your SAS log. You need at least two non-missing  categories for both of your variables to do the Chi Square test.

34         proc freq data = sashelp.class;
35           where Sex = 'F';
36           table age * sex / chisq;
37         run;

NOTE: No statistics are computed for Age * Sex since Sex has less than 2 nonmissing levels.
NOTE: There were 9 observations read from the data set SASHELP.CLASS.
      WHERE Sex='F';
NOTE: PROCEDURE FREQ used (Total process time):
      real time           0.09 seconds
      cpu time            0.04 seconds

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 ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 752 views
  • 1 like
  • 2 in conversation