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;
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.
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".
@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.
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!
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.