I was performing two-sample t-test using PROC ANOVA and used the following generic code to generate the output:
PROC ANOVA DATA=data-set-name;
CLASS class-variable;
MODEL measurement-variable=class-variable;
MEANS class-variable / t;
run;
For one data I got the following result:
On another dataset using the same code the result was different.
Though I can understand both the output but I want to know that why the Output Table was different in both the cases.
Any help will be appreciated.
SAS Version used 9.1
Look at the documentation for the MEANS statement. It says that the output can be displayed in two ways, which you can specify by using: the CLDIFF option or the LINES option. The doc goes on to say:
The CLDIFF option is the default for unequal cell sizes.
and
The LINES option is appropriate for equal cell sizes, for which it is the default. The LINES option is also the default if ...there are only two cells of unequal size.
It looks like the first data set has unequal cell sizes, where the second data set has equal cell sizes. You can use the CLDIFF option to force the second output to look like the first.
Look at the documentation for the MEANS statement. It says that the output can be displayed in two ways, which you can specify by using: the CLDIFF option or the LINES option. The doc goes on to say:
The CLDIFF option is the default for unequal cell sizes.
and
The LINES option is appropriate for equal cell sizes, for which it is the default. The LINES option is also the default if ...there are only two cells of unequal size.
It looks like the first data set has unequal cell sizes, where the second data set has equal cell sizes. You can use the CLDIFF option to force the second output to look like the first.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.