Sample 39192: Liver function test safety panel, baseline vs. study
This sample uses the SGPANEL procedure to create a panel of scatter plots showing a liver function test safety panel.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample uses the SGPANEL procedure to create a panel of scatter plots showing a liver function test safety panel.
proc template;
define style listingSmallFont;
parent = styles.listing;
style GraphFonts from GraphFonts
"Fonts used in graph styles" /
'GraphUnicodeFont' = ("",9pt)
'GraphValueFont' = (", ",8pt)
'GraphLabelFont' = (", ",9pt)
'GraphFootnoteFont' = (", ",8pt)
'GraphTitleFont' = (", ",11pt,bold);
end;
run;
data labs_data (keep=drug alat biltot alkph asat
palat pbiltot palkph pasat visitnum);
label alat="ALAT (/ULN)";
label biltot="BILTOT (/ULN)";
label alkph="ALKPH (/ULN)";
label asat="ASAT (/ULN)";
visitnum=1;
do i=1 to 100;
palat = min (4, 2.5 * (abs(rannor(123))) / 3.0);
pbiltot = min (4, 2.5 * (abs(rannor(123))) / 3.0);
palkph = min (4, 2.5 * (abs(rannor(123))) / 3.0);
pasat = min (4, 2.5 * (abs(rannor(123))) / 3.0);
alat = min (4, 2.5 * (abs(rannor(345))) / 3.0);
biltot = min (4, 2.5 * (abs(rannor(345))) / 3.0);
alkph = min (4, 2.5 * (abs(rannor(345))) / 3.0);
asat = min (4, 2.5 * (abs(rannor(345))) / 3.0);
j = rannor(345);
if j > 0 then drug = "A";
else drug="B";
output;
end;
visitnum=2;
do i=1 to 100;
palat = min (4, 2.5 * (abs(rannor(789))) / 3.0);
pbiltot = min (4, 2.5 * (abs(rannor(789))) / 3.0);
palkph = min (4, 2.5 * (abs(rannor(789))) / 3.0);
pasat = min (4, 2.5 * (abs(rannor(789))) / 3.0);
alat = min (4, 2.5 * (abs(rannor(567))) / 3.5);
biltot = min (4, 2.5 * (abs(rannor(567))) / 3.5);
alkph = min (4, 2.5 * (abs(rannor(567))) / 3.5);
asat = min (4, 2.5 * (abs(rannor(567))) / 3.5);
j = rannor(567);
if j > 0 then drug = "A";
else drug="B";
output;
end;
visitnum=3;
do i=1 to 100;
palat = min (4, 2.5 * (abs(rannor(321))) / 3.0);
pbiltot = min (4, 2.5 * (abs(rannor(321))) / 3.0);
palkph = min (4, 2.5 * (abs(rannor(321))) / 3.0);
pasat = min (4, 2.5 * (abs(rannor(321))) / 3.0);
alat = min (4, 2.5 * (abs(rannor(975))) / 2.5);
biltot = min (4, 2.5 * (abs(rannor(975))) / 2.5);
alkph = min (4, 2.5 * (abs(rannor(975))) / 2.5);
asat = min (4, 2.5 * (abs(rannor(975))) / 2.5);
j = rannor(975);
if j > 0 then drug = "A";
else drug="B";
output;
end;
run;
proc format;
value wk
1='1 Week'
2='3 Months'
3='6 Months';
value lab
1='ALAT'
2='Bilirubin Total'
3='Alk Phosphatase'
4='ASAT';
value $trt
"A"="Drug A (n=240)"
"B"="Drug B (n=195)";
run;
data labs (keep=visitnum drug labtest result pre);
format visitnum wk. labtest lab. drug $trt.;
set labs_data;
pre=palat;
labtest=1;
result=alat;
output;
pre=pbiltot;
labtest=2;
result=biltot;
output;
pre=palkph;
labtest=3;
result=alkph;
output;
pre=pasat;
labtest=4;
result=asat;
output;
run;
ods listing close;
ods html file='safety.html' path='.' style=listingSmallFont;
ods graphics on / reset imagefmt=gif width=600px height=400px
imagename='ClinicalHandout_SafetyPanel';
title 'LFT Safety Panel, Baseline vs. Study';
title2 ' ';
footnote1 ' ';
footnote2 j=l italic height=8pt
"* For ALAT, ASAT and Alkaline Phosphatase,"
" the Clinical Concern Level is 2 ULN;";
footnote3 j=l italic height=8pt
" For Bilirubin Total, the CCL is 1.5 ULN: "
"where ULN is the Upper Level of Normal";
proc sgpanel data=labs;
panelby labtest visitnum / layout=lattice onepanel novarname;
scatter x=pre y=result / group=drug markerattrs=(size=9);
refline 1 1.5 2 / axis=Y lineattrs=(pattern=dash);
refline 1 1.5 2 / axis=X lineattrs=(pattern=dash);
rowaxis integer min=0 max=4 label='Study (/ULN)';
colaxis integer min=0 max=4 label='Baseline (/ULN) *';
keylegend / title=" " noborder;
run;
ods html close;
ods listing;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample uses the SGPANEL procedure to create a panel of scatter plots showing a liver function test safety panel.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> SGPANEL Query and Reporting ==> Creating Reports ==> Graphical ==> Health and Life Sciences Industry
|
Date Modified: | 2010-04-06 14:00:26 |
Date Created: | 2010-03-26 15:24:25 |
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9.2 TS2M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS2M0 | |
Microsoft Windows XP 64-bit Edition | 9.2 TS2M0 | |
Microsoft® Windows® for x64 | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M0 | |
Microsoft Windows XP Professional | 9.2 TS2M0 | |
Windows Vista | 9.2 TS2M0 | |
64-bit Enabled AIX | 9.2 TS2M0 | |
64-bit Enabled HP-UX | 9.2 TS2M0 | |
64-bit Enabled Solaris | 9.2 TS2M0 | |
HP-UX IPF | 9.2 TS2M0 | |
Linux | 9.2 TS2M0 | |
Linux for x64 | 9.2 TS2M0 | |
OpenVMS on HP Integrity | 9.2 TS2M0 | |
Solaris for x64 | 9.2 TS2M0 | |