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

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 436 views
  • 1 like
  • 2 in conversation