Skip to Content
Producing High-Quality Figures Using SAS/GRAPH and ODS Graphics Procedures
book

Producing High-Quality Figures Using SAS/GRAPH and ODS Graphics Procedures

by Charlie Chunhua Liu
February 2015
Beginner to intermediate
282 pages
7h 27m
English
Chapman and Hall/CRC
Content preview from Producing High-Quality Figures Using SAS/GRAPH and ODS Graphics Procedures
131Spaghetti Plots
%let sd = 3.5;
%let seed = 07;
proc format;
value trtdf
1 = ‘Active Control’
2 = ‘New Drug’
OTHER = ‘ ’;
value visdf
1 = ‘Baseline’
2 = ‘Day 1’
3 = ‘Day 3’
4 = ‘Day 7’;
value timedf
1, 4, 7, 10 = ‘8 AM’
2, 5, 8, 11 = ‘10 AM’
3, 6, 9, 12 = ‘4 PM’
OTHER = ‘ ’;
run;
** Generate the required number of subjects and randomly
assign to two treatments;
data subj;
label trtnum = “Treatment”;
do i = 1 to &subjnum.;
subjid = 1000+ i;
if ranuni (&seed.) < = 0.5 then trtnum = 1;
else trtnum = 2;
output;
end;
drop i;
run;
proc freq data = subj noprint;
table trtnum/out = subj_trt;
run;
** Save the subject number at each treatment group to macro
variables for later use;
data _null_;
set subj_trt;
if trtnum = 1 then call symput (“N_Trt1”, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Carpenter's Guide to Innovative SAS Techniques

Carpenter's Guide to Innovative SAS Techniques

Art Carpenter
What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz

Publisher Resources

ISBN: 9781482207026