Programming the statistical procedures from SAS

Why I am getting different Output Tables on using the same Proc ANOVA Code on different dataset?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

Why I am getting different Output Tables on using the same Proc ANOVA Code on different dataset?

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


Accepted Solutions
Solution
‎02-03-2016 01:30 PM
SAS Super FREQ
Posts: 3,305

Re: Why I am getting different Output Tables on using the same Proc ANOVA Code on different dataset?

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


All Replies
Solution
‎02-03-2016 01:30 PM
SAS Super FREQ
Posts: 3,305

Re: Why I am getting different Output Tables on using the same Proc ANOVA Code on different dataset?

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. 

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

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