Help using Base SAS procedures

ODS

Reply
N/A
Posts: 0

ODS

Hi,

Kindly have a look at the code and problem that i'm stucked in below :

Code -

ods rtf file='est4.rtf'/*initialise the RTF file est4 and send the results to the file est4.rtf until the file is closed*/;
title 'Regression model';
proc reg data = review1 outest = est4;
model Z = X Y U V / SELECTION = rsquare cp aic sbc b best=3;
RUN;
quit;
ods rtf close /* close the RTF file est4*/;

Querry-
What code should i use so that the output is printed exactly what is in the output file 'est4' as i do not get the Root Mean Squared Error column that is in the file 'est4' in the word file that gets opened when i use ODS command in the above code

kindest regards,
Mark
SAS Super FREQ
Posts: 8,743

Re: ODS

Hi:
The tabular output from PROC REG is being routed to the ODS RTF file. The output dataset, WORK.EST4 (from your OUTEST= option) is NOT being routed to the RTF file. It is sitting in the WORK library.

If you want to see what's inside the WORK.EST4 file, as you would see, if you did a PROC PRINT, then I suggest that you put a PROC PRINT step for WORK.EST4 before your ODS RTF CLOSE; statement. Just because you name the RTF file EST4.RTF does not mean that the dataset WORK.EST4 will automatically be routed to the RTF file.

cynthia
Contributor
Posts: 57

Re: ODS

Hi,

As Cynthia@sas said add a proc print statement.


title 'Regression model';
proc reg data = review1 outest = est4;
model Z = X Y U V / SELECTION = rsquare cp aic sbc b best=3;
RUN;
quit;

ods rtf file='est4.rtf'/*initialise the RTF file est4 and send the results to the file est4.rtf until the file is closed*/;
proc print data=est4;
title' ';
run;
ods rtf close /* close the RTF file est4*/;

Sandhya.
Ask a Question
Discussion stats
  • 2 replies
  • 112 views
  • 0 likes
  • 3 in conversation