BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
ybz12003
Rhodochrosite | Level 12

Hello,

 

I use the Proc Freq to get Chisq value from Row percent and Column percent.  I found the result came back the same, why?

proc freq data=have;
	table  Insurance * PT_class / chisq nopercent norow;
	where 	PT_class in (1,2) and insurance in (1,2,4);
run;

proc freq data=have;
	table  Insurance * PT_class / chisq nopercent nocol;
	where 	PT_class in (1,2) and insurance in (1,2,4);
run;
1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ
The chi-square is testing the association of the row and column variables in the table as a whole. It is not comparing rows irrespective of the columns or vice versa. Equivalently, the chi-square can be thought of as comparing the row profiles or the column profiles, but it is a matter of convenience to state it as one or the other since they are equivalent comparisons. Again, it is testing the table overall, not just the rows or just the columns. Consequently, the NOROW and NOCOL options have no effect on the chi-square computation.

View solution in original post

5 REPLIES 5
PaigeMiller
Diamond | Level 26

It's the same data, and so you get the same Chi-squared value. The fact that different output options are chosen does not affect the Chi-squared value.

--
Paige Miller
ybz12003
Rhodochrosite | Level 12
Should the chisq value in the comparison of column percent and row percent be different?
StatDave
SAS Super FREQ
The chi-square is testing the association of the row and column variables in the table as a whole. It is not comparing rows irrespective of the columns or vice versa. Equivalently, the chi-square can be thought of as comparing the row profiles or the column profiles, but it is a matter of convenience to state it as one or the other since they are equivalent comparisons. Again, it is testing the table overall, not just the rows or just the columns. Consequently, the NOROW and NOCOL options have no effect on the chi-square computation.
ballardw
Super User

You can add the CellChi option to see the CELL contribution to the chi-square statistic. The "row" and "column" do not get a contribution. The counts are used to calculate the cell contributions but there is no actual "row chi-square".

 

 

PaigeMiller
Diamond | Level 26

@ybz12003 wrote:
Should the chisq value in the comparison of column percent and row percent be different?

No. All you have changed is the information that is displayed in the output from PROC FREQ. You have not changed the calculation of Chi-squared.

--
Paige Miller

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
  • 5 replies
  • 969 views
  • 9 likes
  • 4 in conversation