SAS program template created by SapMaker Table 3.4 for study drug dose exposure – Example One. Please comment on it or post your other SAS code for table of study drug dose exposure.
***************************************************************************************
*** Program Purpose: Create Table EX 1 – Duration of Exposure to Study Medication (Form 2)
*** SAS Dataset Used: , EX
*** Date of Program Created: 8/18/2010
*** Programmer: SapMaker
***************************************************************************************;
libname sasmacro ‘C:\Program Files\SapMaker\SasMacro’;
options nonumber nodate nofmterr mlogic ls=132 ps=48;
option mstored sasmstore=sasmacro;
/** Count number of subjects in each treatment group and set it to macro variable npt1, npt2, etc. **/
%GroupCount(
CohortDataset=,
Treatment=TRTGRPC,
Usubjid=USUBJID);
%SumIncidentCatVar(
VarName=ANYEXPOS,
VarLabel=%bquote(Subjects taken at lease one dose, n(%)),
CategoryName=%bquote(Y),
CategoryFormat=%str(),
CategoryOrder=%str(1),
Treatment=TRTGRPC,
ByGroup=%str(),
Population=,
CohortDataset=,
AnalysisDataset=EX,
OutDataset=Sum_ANYEXPOS,
OutVariable=%str(LabelCol_1, Col_1, Col_2, Col_3),
Usubjid=USUBJID,
DatasetOrder=1
);
%SumStatCntVar(
VarName=EXPOSDUR,
VarLabel=%bquote(Total Exposure Duration),
SumStatName=%bquote(n, Mean (SD), Median, Range),
SumStatFormat=%str(3.0, 3.0, 3.0),
SumStatOrder=%str(1, 2, 3, 4),
Treatment=TRTGRPC,
ByGroup=%str(),
Population=,
CohortDataset=,
AnalysisDataset=EX,
OutDataset=Sum_EXPOSDUR,
OutVariable=%str(LabelCol_1, Col_1, Col_2, Col_3),
DatasetOrder=2
);
data rptSet;
set
Sum_ANYEXPOS
Sum_EXPOSDUR
;
run;
*** Proc Printto file =” ” new; run;
title1 “Table EX 8”;
title2 “Duration of Exposure to Study Medication (Form 2)”;
title3 “All Randomized Subjects”;
data _NULL_;
length ft $132.;
ft=%str(repeat(“_”, 132));
call symput(‘f1’, ft);
ft =%str(“Note: denominator of percentage is the number of subjects in the column”);
call symput(‘f2’, ft);
ft =%str(“(a) From Kreski-Wallis test.”);
call symput(‘f3’, ft);
run;
footnote1 “&f1”;
footnote2 “&f2”;
footnote3 “&f3″;
Proc Report Data = rptSet split=”#” spacing =2 nowindows list headskip missing;
Column
_setorder LabelCol_1
( “Placebo#” Col_1 )
( “Dose 10 mg#” Col_2 )
( “Dose 100 mg#” Col_3 )
ExtCol_1 ;
define _setorder / order order=data noprint;
define LabelCol_1 / display width=14 left flow “Dose Exposure#__”;
define Col_1 / display width=8 center “(N=%trim(%left(&npt1)))#__”;
define Col_2 / display width=11 center “(N=%trim(%left(&npt2)))#__”;
define Col_3 / display width=12 center “(N=%trim(%left(&npt3)))#__”;
define ExtCol_1 / display width=12 center “p-value (a)#__”;
break after _setorder / skip suppress;
run;
Proc Printto; run;