BookmarkSubscribeRSS Feed
sasban
Obsidian | Level 7

I'm new is SAS, trying to open proc means output in proc report to beautify it. However, it didn't open as it was in proc mean. I would appreciate any suggestions, tips and tricks.

7 REPLIES 7
error_prone
Barite | Level 11
You could use output statement in proc means to create a dataset and use that in proc report. But proc report can aggregate data, so maybe proc means is not necessary at all. You have to show your proc means code to help you further.
sasban
Obsidian | Level 7

@error_prone,

 

I'm looking for output like in proc report (below), Can I get that output through proc means (below)? 

 

Proc import datafile="/folders/myshortcuts/Myfolders/SAS Exercise/EFF_Exercise.xls"
    Out=AE
    Dbms=XLS replace;
run;
 
 
data AEsmall;
set AE (keep=avisitn avisitn_1 trt01p aval);
run;
 
Proc sort data=AEsmall out=AEready;
by avisitn;
run; 
 
Proc means data=AEready N mean stderr maxdec=3;
var aval;
class avisitn avisitn_1 trt01p;
ods output summary=AE1;
run;
 
data viral_load;
set AE1;
format aval_mean_se $50.;
drop NObs aval_mean aval_stderr;
aval_mean_se=put(aval_mean, 5.3)!!' ('!!put(aval_stderr, 5.3)!!')';
run;
 
Proc report data=viral_load out=TableQ7;
title1 'Table 1:';
title2 'Summary of Viral Load Over Time';
title3 'ITT Population';
column avisitn trt01p aval_N aval_mean_se;
define avisitn/group 'Test day (Week)';
define trt01p/group 'Treatment';
define aval_N/group 'N';
define aval_mean_se/display 'Unadjusted Mean (SE)';
run;
Reeza
Super User

Not by default, you need to use a process similar to what's shown which involves customizing the output to what you need.

Reeza
Super User

Don't. Learn to use ODS first and control the output directly from PROC MEANS. 

sasban
Obsidian | Level 7

I need to get an output as attached from a data set. I tried using Proc means and Proc report, but didn't help. Any suggestions please?

Reeza
Super User

Yeah, that's not standard output. Look for a paper called 'Creating Complex Reports' from Cynthia Zender that will detail how to create these reports.

sasban
Obsidian | Level 7

Thank you 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
  • 7 replies
  • 1384 views
  • 4 likes
  • 3 in conversation