BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jayantyad
Fluorite | Level 6

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:

Proc Anova Res1.jpg

 

On another dataset using the same code the result was different.

Proc Anova Res2.jpg 

 

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

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

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. 

View solution in original post

1 REPLY 1
Rick_SAS
SAS Super FREQ

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. 

sas-innovate-2024.png

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.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 1 reply
  • 1316 views
  • 4 likes
  • 2 in conversation