Hi, I need to know how to add median , first quartile to the third quartile on the second line of the report;
this is my script:
proc format;
value RAN_TO_AP 2='Octreotide' 1='Soma' ;
run;
ods listing close;
ods ESCAPECHAR = '!';
ods rtf file="&path.rtf" style=statsinrows;
proc report data=aladin nowd ;
column Parameter RAN_TO_AP, (('Baseline' map_v1=h map_v1=hsd map_v1=hm)('treatment' map_v7=w map_v7=wsd map_v7=wm)('Recovery' map_24f_270415=m map_24f_270415=msd map_24f_270415=mm) );
define RAN_TO_AP / across width=3;
define h /' ' analysis median style=[cellwidth=50 just=R borderrightstyle=hidden] format=2.1;
define hsd / ' ' analysis q1 style=[cellwidth=50 just=L borderleftstyle=hidden]f=paren.;
define hm / ' ' analysis q3 style=[cellwidth=50 just=L borderleftstyle=hidden]f=paren.;
define w /' ' analysis median style=[cellwidth=50 just=R borderrightstyle=hidden] format=2.1;
define wsd / ' ' analysis q1 style=[cellwidth=50 just=L borderleftstyle=hidden] f=paren.;
define wm / ' ' analysis q3 style=[cellwidth=50 just=L borderleftstyle=hidden]f=paren.;
define m /' ' analysis median style=[cellwidth=50 just=R borderrightstyle=hidden] format=2.1;
define msd / ' ' analysis q1 style=[cellwidth=50 just=L borderleftstyle=hidden] f=paren.;
define mm / ' ' analysis q3 style=[cellwidth=50 just=L borderleftstyle=hidden] f=paren.;
title1 'Table 1: Patients characteristics at randomization and at the end of treatment period according to study treatment - overall';
run;
ods rtf close;
ods listing;
output
Active Placebo
baseline Treatment Recovery Baseline Treatment Recovery
Parameter
Weight 103 (409.99) 1024 (426.97) 935 (345.12) 1016 (367.61) 1042
Height 15 (28.06) 12 (17.15) 15 (57.30) 20 (61.99) 16 (77.52) 12 (15.18)
output i need it:+
Active Placebo Baseline Treatment Recovery Baseline Treatment Recovery
Parameter
Weight 103 (409.99) 1024 (426.97) 935 (345.12) 1016 (367.61) 1042
88 (75 to 107) 91 (73 to 97) 89 (83.3 to 100) 88 (75 to 107) 91
Height 15 (28.06) 12 (17.15) 15 (57.30) 20 (61.99) 16 (77.52) 12 (15.18)
88 (75 to 107) 91 (73 to 97) 89 (83.3 to 100) 88 (75 to 107) 91
where in first line there is mEAN (STD) and the second line median (q1 to q3)
Thanks guys
Hi, you will have to restructure your data. PROC REPORT will only add another report row for WEIGHT and HEIGHT if you have an observation in the data. This may mean you need to use 1 procedure (like MEANS or TABULATE to calculate the statistics you want) and then restructure your DATA so that you can use PROC REPORT to get the final report the way you want.
cynthia
thanks for the reply !
I have several variables representing three different time : baseline, treatmente and recovery so I dont know how to change the dataset; the advice of the different procedures is appreciated,
thank you Cynthia
Hi:
Still not at a good computer for long posts, but this looks like a standard demographic type report. I had a paper back in 2008 called "Creating Complex Reports" that had 3 different examples of creating demographic reports similar to this. 2 of them used PROC REPORT and 1 of them used PROC TEMPLATE, DATA _NULL_ and a custom table template.
I think if you go to support.sas.com/rnd/papers and search for the paper title for 2008, you should find the paper.
cynthia
Thank you Cynthia, my case is Complex 8: Demographic Report Example, i found it for you help!! I use proc TABULATE (for summary) and TEMPLATE (for table template)
thank you very much, you are really kind
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: