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

Hi I am trying to create an ODS OUTPUT of the LSMeans for each of my groups so that I can use that data to graph them later. For reference I am doing a two way ANOVA with one blocking factor. When I run the code I keep getting a warning message shown below:

 

WARNING: Output 'GLM.LSMEANS.A_flour_B_temp.Y_protein.LSMeans' 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.

 

I have included the code that I am using below:

DATA bread;
	INPUT A_flour $ B_temp $ C_day $ Y_protein;
DATALINES;
A  T1  D1  5.8
A  T2  D1  4.6
A  T3  D1  4.7
B  T1  D1  8.4
B  T2  D1  5.4
B  T3  D1  4.9
C  T1  D1 16.0
C  T2  D1  5.2
C  T3  D1  4.2

A  T1  D2 11.4
A  T2  D2  5.2
A  T3  D2  5.2
B  T1  D2  7.9
B  T2  D2  7.9
B  T3  D2  7.2
C  T1  D2 17.7
C  T2  D2  7.0
C  T3  D2  6.3

A  T1  D3 10.5
A  T2  D3  9.7
A  T3  D3  4.9
B  T1  D3 14.7
B  T2  D3  8.1
B  T3  D3  6.9
C  T1  D3 16.9
C  T2  D3 11.5
C  T3  D3  7.2
;
RUN;


PROC GLM DATA=bread;
	CLASS A_flour B_temp C_day;
	MODEL Y_protein = A_flour  B_temp  A_flour*B_temp  C_day;
	OUTPUT OUT=junk PREDICTED=yhat RESIDUAL=e;
QUIT;
PROC UNIVARIATE DATA=junk NORMAL PLOT;
	VAR e;
RUN;
PROC SGPLOT DATA=junk;
	SCATTER Y=e X=yhat;
RUN;


ODS OUTPUT GLM.LSMEANS.A_flour_B_temp.Y_protein.LSMeans = LSM_2wAB;
PROC GLM DATA=bread;
	CLASS A_flour B_temp C_day;
	MODEL Y_protein = A_flour  B_temp  A_flour*B_temp  C_day;
	LSMEANS A_flour*B_temp;
QUIT;

Please let me know if you have any guidance.

Thank you for your help!!

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
ods output lsmeans = lsm2wAB;

Does that not work?

View solution in original post

4 REPLIES 4
JackHamilton
Lapis Lazuli | Level 10

It appears to work for me:

 

 119        ODS OUTPUT GLM.LSMEANS.A_flour_B_temp.Y_protein.LSMeans = LSM_2wAB;
 120        PROC GLM DATA=bread;
 121            CLASS A_flour B_temp C_day;
 122            MODEL Y_protein = A_flour  B_temp  A_flour*B_temp  C_day;
 123            LSMEANS A_flour*B_temp;
 124        quit;
 
 NOTE: The data set WORK.LSM_2WAB has 9 observations and 5 variables.
 NOTE: PROCEDURE GLM used (Total process time):
       real time           0:00:00.41
       cpu time            0:00:00.15
       Timestamp           April 20, 2020 02:02:39 PM

If you start a new SAS Studio session and run only the code you included in your message, does it work?  My guess is that something in your environment is set incorrectly, but it's difficult to tell what.  Do you have any other ODS statements earlier in the program?

 

Jenna3
Calcite | Level 5

Thanks for the suggestion. I started a new SAS Studio session and ran only the code in the question, but I still get the same error message. I am using SAS studio through the university edition if that makes a difference. 

Reeza
Super User
ods output lsmeans = lsm2wAB;

Does that not work?
Jenna3
Calcite | Level 5
It does work!
Thanks for your help Reeza!

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1069 views
  • 1 like
  • 3 in conversation