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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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