Ok. The PROC FREQ output (with the chi square option) is
1) contingency table
2) Chi square test
I would like to have in the contingency table the p-value, for example:
Group1 Group2 Group3 *
Male xxx xxx xxx
xx% xx% xx%
Female xxx xxx xxx
xx% xx% xx%
*p=x.xxx
Thank you. Unfortunaley it's not exactly what I mean.
The aim is to improve the output and to have all the information in one table.
Maybe I have to use a PUT on a file and a PRINTTO...
Is this what you need?
[pre]
ODS output CHISQ=Chi (keep=Statistic Prob where=(Statistic="Chi-Square"));
proc freq data=SASHELP.CLASS;
table sex*age/out=freq chisq;
run;
proc transpose data=freq out=r(drop=_:) prefix=Age_;
var percent;
id age;
by sex;
run;
data r;
length Sex $10;
set r CHI(in=c rename=(Statistic=Sex Prob=Age_11));
if c then Sex="p-value";
run;
[/pre]
Sincerely,
SPR
Message was edited by: SPR
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.