BookmarkSubscribeRSS Feed
Arthur2
Calcite | Level 5

Hi, I'm using proc mix to fit ANCOVA model to get the following:
1) LS means of each treatment
2) SE of each treatment
3) LS means difference (placebo - each treatment) with placebo as treatn=3
4) SE difference (placebo - each treatment)
5) SD (standard deviation of residuals from the model)
6) Plot studentized residuals versus predicted values, and also check the distribution of (unstandardized) residuals using a plot.

The code is:
ods output lsmeans=estimate
diffs=diff;
proc mixed data = mydata (where=(treatn in (1,2,3)));
by treatn treat avisitn avisit;
class treatn;
model aval = treatn avisitn base;
lsmeans treatn / diff=control('3');
run;
ods output close;

I'm getting error:
"WARNING: Output 'Diff' was not created. Make sure that the output object name, label, or path is spelled correctly. Also, verify
that the appropriate procedure options are used to produce the requested output object. For example, verify that the
NOPRINT option is not used."

Help is needed to resolve the error and guidance to use the proc mix appropriately to achieve above mentioned requirements for ANCOVA.
Thanks

3 REPLIES 3
gcjfernandez
SAS Employee
I think the problem is in the By statement. Provide more details about the by statement. What happens if you run the code without the By statement?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3 replies
  • 540 views
  • 0 likes
  • 4 in conversation