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

I appreciate assistance with the following:

 

This procedure is running fine, but the plot is not showing and I am not getting an error message:

 

ods graphics on;

proc surveyreg ;

 cluster school;

 class age ;

 model ratio_a = age/ vadjust=none;;

 lsmeans age / diff plots=(diff meanplot(cl));

 format age age. ;

run;

ods graphics off;

 

Below is information about the sas system I am using:

 

NOTE: This session is executing on the X64_8PRO platform.

NOTE: Updated analytical products:

SAS/STAT 12.3 (maintenance)
SAS/ETS 12.3 (maintenance)
SAS/OR 12.3 (maintenance)
SAS/IML 12.3 (maintenance)
SAS/QC 12.3 (maintenance)

NOTE: Additional host information:

X64_8PRO WIN 6.2.9200 Workstation

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

If you don't see the graph in my code, it isn't your data.

 

I assume you are running this interactively, right? What interface are you using?

 

I see you are running SAS/STAT 12.3, but I believe that the LSMEANS statement supported the DiffPlot and MeansPlot in 12.3.

Can you generate any plots? Try running a PROC REG step.

 

If you don't see plots from PROC REG, check that your ODS destinations are opened and that the select path is not empty. For example:

ODS SHOW;  /* show the overall exclude list */

 

View solution in original post

9 REPLIES 9
Reeza
Super User
Post the full log please.
Jason2020
Obsidian | Level 7
this is the full log (just removed certain text):
 

NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.

NOTE: SAS (r) Proprietary Software 9.4 (TS1M0)

      Licensed to XXXXXXXXXXXXXXXXXXXXXXX

NOTE: This session is executing on the X64_8PRO  platform.

 

NOTE: Updated analytical products:

 

      SAS/STAT 12.3 (maintenance)

      SAS/ETS 12.3 (maintenance)

      SAS/OR 12.3 (maintenance)

      SAS/IML 12.3 (maintenance)

      SAS/QC 12.3 (maintenance)

 

NOTE: Additional host information:

 

 X64_8PRO WIN 6.2.9200  Workstation

 

NOTE: SAS initialization used:

      real time           5.54 seconds

      cpu time            2.17 seconds

 

1

2    OPTIONS NODATE number=no ls=120;

3

4    libname lib

5    XXXXXXXXXXXXXXXXXXXXXXX

NOTE: Libref LIB was successfully assigned as follows:

      Engine:        V9

      Physical Name: XXXXXXXXXXXXXXXXXXXXXXX

6

7    data tiz;

8      set lib.tizbac;

9     run;

 

NOTE: There were 80 observations read from the data set LIB.TIZBAC.

NOTE: The data set WORK.TIZ has 80 observations and 36 variables.

NOTE: DATA statement used (Total process time):

      real time           0.03 seconds

      cpu time            0.01 seconds

 

10

11   proc format ;

12    value age 8-14='C) 12-14y' 14-16='B) 15-16y' 16-26='A) 17-20y';

NOTE: Format AGE has been output.

13   run;

 

NOTE: PROCEDURE FORMAT used (Total process time):

      real time           0.03 seconds

      cpu time            0.01 seconds

 

14

15   ods graphics on;

16   proc surveyreg ;

17    cluster school;

18    class age ;

19    model ratio_aa = age/ vadjust=none;

20    lsmeans age / diff plots=(diff meanplot);

21    format age age. ;

22   run;

 

NOTE: PROCEDURE SURVEYREG used (Total process time):

      real time           0.78 seconds

      cpu time            0.31 seconds

 

23   ods graphics off;

Jason2020
Obsidian | Level 7

This is the full log (just removed the identification text):

 

NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.

NOTE: SAS (r) Proprietary Software 9.4 (TS1M0)

      Licensed to XXXXXXXXXXXXXXXXXXXXXXX

NOTE: This session is executing on the X64_8PRO  platform.

 

NOTE: Updated analytical products:

 

      SAS/STAT 12.3 (maintenance)

      SAS/ETS 12.3 (maintenance)

      SAS/OR 12.3 (maintenance)

      SAS/IML 12.3 (maintenance)

      SAS/QC 12.3 (maintenance)

 

NOTE: Additional host information:

 

 X64_8PRO WIN 6.2.9200  Workstation

 

NOTE: SAS initialization used:

      real time           5.54 seconds

      cpu time            2.17 seconds

 

1

2    OPTIONS NODATE number=no ls=120;

3

4    libname lib

5    XXXXXXXXXXXXXXXXXXXXXXX

NOTE: Libref LIB was successfully assigned as follows:

      Engine:        V9

      Physical Name: XXXXXXXXXXXXXXXXXXXXXXX

6

7    data tiz;

8      set lib.tizbac;

9     run;

 

NOTE: There were 80 observations read from the data set LIB.TIZBAC.

NOTE: The data set WORK.TIZ has 80 observations and 36 variables.

NOTE: DATA statement used (Total process time):

      real time           0.03 seconds

      cpu time            0.01 seconds

 

10

11   proc format ;

12    value age 8-14='C) 12-14y' 14-16='B) 15-16y' 16-26='A) 17-20y';

NOTE: Format AGE has been output.

13   run;

 

NOTE: PROCEDURE FORMAT used (Total process time):

      real time           0.03 seconds

      cpu time            0.01 seconds

 

14

15   ods graphics on;

16   proc surveyreg ;

17    cluster school;

18    class age ;

19    model ratio_aa = age/ vadjust=none;

20    lsmeans age / diff plots=(diff meanplot);

21    format age age. ;

22   run;

 

NOTE: PROCEDURE SURVEYREG used (Total process time):

      real time           0.78 seconds

      cpu time            0.31 seconds

 

23   ods graphics off;

 

Jason2020
Obsidian | Level 7

Anyone with a clue on why the graph is not showing?

Thanks.

Rick_SAS
SAS Super FREQ

Run the following code and let me know if you see the MeanPlot and the DiffPlot.

 

 

proc surveyreg data=sashelp.cars(where=(type in ('Sedan', 'SUV', 'Truck')));
cluster origin;
class type ;
model mpg_city = type/ vadjust=none;
lsmeans type / diff plots=(diff meanplot);
run;

If not, there might be something strange with your data. Maybe missing groups? Run the following and let us know what you see

 

 

proc freq data=tiz;
tables school*age;
format age age. ;
run;

 

Jason2020
Obsidian | Level 7
I did run the code you sent and I don't see a graph. I will check my data. Thanks for the advice.
Rick_SAS
SAS Super FREQ

If you don't see the graph in my code, it isn't your data.

 

I assume you are running this interactively, right? What interface are you using?

 

I see you are running SAS/STAT 12.3, but I believe that the LSMEANS statement supported the DiffPlot and MeansPlot in 12.3.

Can you generate any plots? Try running a PROC REG step.

 

If you don't see plots from PROC REG, check that your ODS destinations are opened and that the select path is not empty. For example:

ODS SHOW;  /* show the overall exclude list */

 

ballardw
Super User

Which ODS Destination are you sending the output to? If you only have the LISTING destination open then ODS Graphics don't appear. You need something like ODS HTML; ODS RTF or ODS PDF thought these last two would be external documents and would not likely open until an ODS RTF or PDF CLOSE is encountered.

Jason2020
Obsidian | Level 7

Thank you all very much. Yes, I did not declare a destination for the ODS. I thought it will just show on my screen and then I save it. I don't do graphs that often, so I forgot.

Thanks a gain.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 9 replies
  • 10396 views
  • 9 likes
  • 4 in conversation