BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
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
Sandhya
Fluorite | Level 6
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.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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