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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.