Date: Thu, 1 Oct 2009 09:20:37 -0500
Reply-To: "Data _null_;" <iebupdte@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Data _null_;" <iebupdte@GMAIL.COM>
Subject: Clinical Trials Reporting (scoring a questionnaire)
Content-Type: text/plain; charset=ISO-8859-1
Scoring the EQ-5D is not complicated, but it does involve 12
coefficients with three decimal places. This is can all be packaged
for easy consumption using and INFORMAT. I choose to use PROC SCORE
which required the construction of dummy variables with GLMMOD. This
way I can just set up the data set of coefficients and let the PROCS
do the heavy lifting.
/*EuroQOL EQ-5D*/
/*Create INFORMAT for EQ-5D Health State Index Score*/
/*Uses some of my "favorite" PROCs, PLAN, GLMMOD, TRANSPOSE, RANK,
SCORE and FORMAT*/
/* Create the 243 possible answers to the 5 questions*/
proc plan ordered;
factors EQ5D_1=3 EQ5D_2=3 EQ5D_3=3 EQ5D_4=3 EQ5D_5=3 / noprint;
output out=eq5d;
run;
quit;
data eq5d;
set eq5d;
array eq[*] eq5d_1-eq5d_5;
length EQindxS $5;
EQindxs = cats(of eq[*]);
y = input(EQINDXS,5.);
Const1 = not not indexC(eqindxS,'23');
Const2 = not not indexC(eqindxS,'3');
run;
proc glmmod outdesign=design outparm=parm noprint;
class eq5d_1-eq5d_5;
model y = const1 const2 eq5d_1-eq5d_5;
run;
data score;
* This data is base on OUTPARM data set.;
input EFFNAME:$32. coef :3.3;
HSIS = -coef;
length _name_ $32;
_name_ = cats('Col',_N_);
retain _type_ 'SCORE';
cards;
Intercept -1.
Const1 081
Const2 269
EQ5D_1 0
EQ5D_1 069
EQ5D_1 314
EQ5D_2 0
EQ5D_2 104
EQ5D_2 214
EQ5D_3 0
EQ5D_3 036
EQ5D_3 094
EQ5D_4 0
EQ5D_4 123
EQ5D_4 386
EQ5D_5 0
EQ5D_5 071
EQ5D_5 236
;;;;
run;
* Transpose to get proper structure for PROC SCORE;
proc transpose data=score out=score;
by _type_;
var HSIS;
run;
proc print;
run;
proc score data=design score=score out=HSIS;
var col:;
run;
data cntl;
retain fmtname 'HSIS' type 'I' hlo 'J ';
set HSIS end=eof;
start = put(y,F5.);
label = put(hsis,F6.3);
output;
if eof then do;
call missing(start,label);
hlo = 'JO';
output;
end;
run;
proc format cntlin=cntl fmtlib;
run;
data HSIS;
set eq5d(keep=EQindxS);
HSIS = input(EQindxS,hsis.);
run;
* Check that ties are properly assigned;
proc sort data=hsis;
by descending hsis;
run;
proc rank data=hsis out=hsis descending;
var hsis;
ranks rHSIS;
format rhsis: best5.;
run;
proc print;
run;
|