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

Hi,

I am running PROC GLIMMIX for a number of response variables (using a BY statement) and would like to save just the StudentPanel graphs of each of the BY run in one RTF file. Is this possible in SAS?

Thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

It looks like you can create the destinations with an ID and then control the output to each RTF file.

 

ods rtf (id=1) file='/folders/myfolders/want1.rtf' style=journal;
ods rtf (id=2) file='/folders/myfolders/want2.rtf' style=journal;

ods rtf (id=1) select ResidualPlot;
ods rtf (id=2) select parameterEstimates;

proc reg data=sashelp.class;
model weight=age height;
run;
ods select all;

ods rtf (id=1) close;
ods rtf (id=2) close;

View solution in original post

5 REPLIES 5
Reeza
Super User

Sure can.

 

Use ODS SELECT to find the name of the graph, I'm going to assume it's STUDENTPANEL in this example.

 

ods rtf file='C:\temp\want.rtf' style=statistical;

ods select StudentPanel;
proc Glimmix ...

run;
ods select all;

ods rtf close;
JulieM
Obsidian | Level 7

 

Thanks!

 

But does this mean that if I want to save model results of all runs in one file (e.g., fit statistics, test of fixed effects) and studentpanel graphs of all runs in another file, I would have to run Proc GLIMMIX twice?

 

 

ods rtf file ="M:\model.rtf";

ODS EXCLUDE Classlevels LSMeans;
Proc GLIMMIX data=pheno;
by response;
run; ods select all; ods rtf close; ods rtf file ="M:\panels.rtf"; ods select studentpanel; proc GLIMMIX data=pheno plots=studentpanel; by response;
run; ods select all; ods rtf close;
Reeza
Super User

AFAIK that would be the easiest method, but the SAS guru's may have another solution to direct the output to specific files. 

 

 

Reeza
Super User

It looks like you can create the destinations with an ID and then control the output to each RTF file.

 

ods rtf (id=1) file='/folders/myfolders/want1.rtf' style=journal;
ods rtf (id=2) file='/folders/myfolders/want2.rtf' style=journal;

ods rtf (id=1) select ResidualPlot;
ods rtf (id=2) select parameterEstimates;

proc reg data=sashelp.class;
model weight=age height;
run;
ods select all;

ods rtf (id=1) close;
ods rtf (id=2) close;
JulieM
Obsidian | Level 7

Perfect!

You're an angel!

 

Thanks!

(sorry for all the exclamation marks!) Smiley Very Happy

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 5 replies
  • 1599 views
  • 4 likes
  • 2 in conversation