/******************************************* * Macro to score the EPIC-26 * * Version 6.2002 * * * * Last modified 30 October 2002 * ******************************************** * * * Instructions for use: * * * * 1) Create a SAS dataset containing the * * responses to each of the EPIC * * questions. Make sure that the * * variable names for each question use * * the notation of q#, where # is the * * question number found in the right * * margin of the instrument (e.g., the * * first question should be called q11). * * * * 2) Either include the following code in * * your SAS program or save it to a * * drive and refer to it using the * * %include statement * * (e.g., %include scoring.sas;) * * * * 3) Submit the macro call after * * submitting the code or %include * * statement from Step 2. * * (e.g., %score(input,output), where * * INPUT and OUTPUT are the names of * * your original dataset and your * * to-be-created scored dataset, * * respectively. * ********************************************************** * * * Example of use, assuming: * * Input dataset is in c:\epic folder * * Output dataset should go in c:\epic * * Scoring macro file is called scoring-epic26-6.2002.sas * * and is located in c:\epic * * * * libname epic 'c:\epic'; * * %include 'c:\epic\scoring-epic26-6.2002.sas'; * * %scoresf(epic.qdata,epic.scoredata); * *********************************************************/ %macro scoresf(input,output); data &output; set &input; * EPIC questions; array q15u{5} q23 q57 q58 q60 q64; array q14u{2} q26 q59; array q04d{15} q28 q29 q30 q31 q33 q49 q50 q52 q53 q54 q74 q75 q77 q78 q79; array q15d{3} q34 q55 q68; * EPIC standardized scores; array r15u{5} r23 r57 r58 r60 r64; array r14u{2} r26 r59; array r04d{15} r28 r29 r30 r31 r33 r49 r50 r52 r53 r54 r74 r75 r77 r78 r79; array r15d{3} r34 r55 r68; * Create EPIC standardized scores; do i=1 to 5; r15u[i]=(q15u[i]-1)*25; end; do i=1 to 2; r14u[i]=round((q14u[i]-1)*100/3); end; do i=1 to 15; r04d[i]=(q04d[i]-4)*-25; end; do i=1 to 3; r15d[i]=(q15d[i]-5)*-25; end; r27=round((q27-3)*-100/3); * Create EPIC domain scores; if n (of r29-r31,r33) = 4 then uir=mean (of r29-r31,r33); if n (r23,of r26-r28) = 4 then uin=mean (r23,of r26-r28); if n (r49,r50,of r52-r55) >= 5 then b=mean (r49,r50,of r52-r55); if n (of r57-r60,r64,r68) >= 5 then s=mean (of r57-r60,r64,r68); if n (r74,r75,of r77-r79) >= 4 then h=mean (r74,r75,of r77-r79); drop r23-r34 r42-r80 i; label uir='Urinary Irritative' uin='Urinary Incontinence' b='Bowel' s='Sexual' h='Hormonal'; run; %mend scoresf;