Quick question about the chi square from the surveyfreq command,
I'll enter something like the following:
PROC SURVEYFREQ DATA= code;
CLUSTER xxxx;
STRATA xxx;
weight xx;
TABLE obesity*gender/chisq;
RUN;
I get a chi square result. However if I double check this result with any online 2x2 table calculator, the p-value is different.
However if I do a regular PROC FREQ chisquare instead of surveyfreq, the p-value checks out with all those online calculators.
Am I doing something wrong with the surveyfreq command? Or is the calculation intrinsically different for a surveyfreq such that it won't check out with the online calculators like regular proc freq does?
Thanks