/* Written by Janel Hanmer July 2005 Checked against code by Dennis Fryback Scoring for the subscales comes from Ware Jr JE, Snow KK, Kosinski M, Gandek B. SF-36 Health Survey Manual and Interpretation Guide. 1993. The Health Institute, New England Medical Center. Boston, MA The scoring for the MCS and PCS comes from Ware Jr JE, Kosinski M, Keller SD. SF-36 Physical and Menatl Health Summary Scales: A User's Manual. 1994 The Health Institute, New England Medical Center. Boston, MA This code will calculate subscale score if *half or more* of the subscale items are answered This code presumes field names and responses are entered as followed: sf1 = in general from 1="excellent" to 5="poor" sf2 = one year ago from 1="much better" to 5="much worse" sf3 = vigorous activities from 1="limited a lot" to 3="not limited at all" sf4 = moderate activites from 1="limited a lot" to 3="not limited at all" sf5 = groceries from 1="limited a lot" to 3="not limited at all" sf6 = several flights from 1="limited a lot" to 3="not limited at all" sf7 = one flight from 1="limited a lot" to 3="not limited at all" sf8 = bending/kneeling from 1="limited a lot" to 3="not limited at all" sf9 = more than a mile from 1="limited a lot" to 3="not limited at all" sf10 = several blocks from 1="limited a lot" to 3="not limited at all" sf11 = one block from 1="limited a lot" to 3="not limited at all" sf12 = bathing/dressing from 1="limited a lot" to 3="not limited at all" sf13 = physical cut amount where 1="yes" and 2="no" sf14 = physical accomplish less where 1="yes" and 2="no" sf15 = physical limit kind where 1="yes" and 2="no" sf16 = physcial difficulty where 1="yes" and 2="no" sf17 = emotional cut amount where 1="yes" and 2="no" sf18 = emotional accomplish less where 1="yes" and 2="no" sf19 = emotional less careful where 1="yes" and 2="no" sf20 = social activities from 1="not at all" to 5="extremely" sf21 = body pain from 1="none" to 6="very severe" sf22 = pain interfere from 1="not at all" to 5="extremely" sf23 = pep from 1="all of the time" to 6="none of the time" sf24 = nervous from 1="all of the time" to 6="none of the time" sf25 = dumps from 1="all of the time" to 6="none of the time" sf26 = calm from 1="all of the time" to 6="none of the time" sf27 = energy from 1="all of the time" to 6="none of the time" sf28 = downhearted from 1="all of the time" to 6="none of the time" sf29 = worn out from 1="all of the time" to 6="none of the time" sf30 = happy from 1="all of the time" to 6="none of the time" sf31 = tired from 1="all of the time" to 6="none of the time" sf32 = social activites2 from 1="all of the time" to 5="none of the time" sf33 = sicker from 1="definitely true" to 5="definitely false" sf34 = as healthy from 1="definitely true" to 5="definitely false" sf35 = expect worse from 1="definitely true" to 5="definitely false" sf36 = is excellent from 1="definitely true" to 5="definitely false" */ /*enter the location of your dataset here */ data SF36; set ' '; run; /* General Health Subscale*/ data SF36; set SF36; if sf1=1 then health=5; if sf1=2 then health=4.4; if sf1=3 then health=3.4; if sf1=4 then health=2; if sf1=5 then health=1; if sf34=1 then rsf34=5; if sf34=2 then rsf34=4; if sf34=3 then rsf34=3; if sf34=4 then rsf34=2; if sf34=5 then rsf34=1; if sf36=1 then rsf36=5; if sf36=2 then rsf36=4; if sf36=3 then rsf36=3; if sf36=4 then rsf36=2; if sf36=5 then rsf36=1; ghsum=0; if 0 2) then GH=round(((ghsum-ghcount)/(4*ghcount))*100,.1); else GH = .; run; /* Physical Function Subscale*/ data SF36; set SF36; pfsum=0; if 0 4) then PF=round(((pfsum-pfcount)/(2*pfcount))*100,.1); else PF = .; run; /*Role Physical Subscale*/ data SF36; set SF36; rpsum=0; if 0 1) then RP=round(((rpsum-rpcount)/(rpcount))*100,.1); else RP = .; run; /*Bodily Pain Subscale*/ data SF36; set SF36; body=.; body2=.; if sf21=6 then body=1; if sf21=5 then body=2.2; if sf21=4 then body=3.1; if sf21=3 then body=4.2; if sf21=2 then body=5.4; if sf21=1 then body=6; if sf21=1 and sf22=1 then body2=6; if sf21>1 and sf22=1 then body2=5; if sf22=2 then body2=4; if sf22=3 then body2=3; if sf22=4 then body2=2; if sf22=5 then body2=1; if body=. and sf22=1 then body2=6; if body=. and sf22=2 then body2=4.75; if body=. and sf22=3 then body2=3.5; if body=. and sf22=4 then body2=2.25; if body=. and sf22=5 then body2=1; bpcount=0; if 0 0) then BP=round(((bpsum-bpcount)/(5*bpcount))*100,.1); else BP = .; run; /*Vitality Subscale*/ data SF36; set SF36; if sf23=6 then rsf23=1; if sf23=5 then rsf23=2; if sf23=4 then rsf23=3; if sf23=3 then rsf23=4; if sf23=2 then rsf23=5; if sf23=1 then rsf23=6; if sf27=6 then rsf27=1; if sf27=5 then rsf27=2; if sf27=4 then rsf27=3; if sf27=3 then rsf27=4; if sf27=2 then rsf27=5; if sf27=1 then rsf27=6; vtsum=0; if 0 1) then VT=round(((vtsum-vtcount)/(5*vtcount))*100,.1); else VT = .; run; /*Social Function Subscale*/ data SF36; set SF36; rsf20=.; if sf20=1 then rsf20=5; if sf20=2 then rsf20=4; if sf20=3 then rsf20=3; if sf20=4 then rsf20=2; if sf20=5 then rsf20=1; sfsum=0; if 0 0) then SF=round(((sfsum-sfcount)/(4*sfcount))*100,.1); else SF = .; run; /*Role Emotional Subscale*/ data SF36; set SF36; resum=0; if 0 1) then RE=round(((resum-recount)/(recount))*100,.1); else RE = .; run; /*Mental Health Subscale*/ data SF36; set SF36; if sf26=1 then rsf26=6; if sf26=2 then rsf26=5; if sf26=3 then rsf26=4; if sf26=4 then rsf26=3; if sf26=5 then rsf26=2; if sf26=6 then rsf26=1; if sf30=1 then rsf30=6; if sf30=2 then rsf30=5; if sf30=3 then rsf30=4; if sf30=4 then rsf30=3; if sf30=5 then rsf30=2; if sf30=6 then rsf30=1; mhsum=0; if 0 2) then MH=round(((mhsum-mhcount)/(5*mhcount))*100,.1); else MH = .; run; /*Mental and Physical Composite Scales*/ data SF36; set SF36; pf_z=(pf-84.52404)/22.89490; rp_z=(rp-81.19907)/33.79729; bp_z=(bp-75.49196)/23.55879; gh_z=(gh-72.21316)/20.16964; vt_z=(vt-61.05453)/20.86942; sf_z=(sf-83.59753)/22.37642; re_z=(re-81.29467)/33.02717; mh_z=(mh-74.84212)/18.01189; run; data SF36; set SF36; prepcs=(pf_z*.42402)+(rp_z*.35119)+(bp_z*.31754)+(gh_z*.24954)+(vt_z*.02877)+(sf_z*(0-.00753))+(re_z*(0-.19206))+(mh_z*(0-.22069)); premcs=(pf_z*-.22999)+(rp_z*-.12329)+(bp_z*-.09731)+(gh_z*-.01571)+(vt_z*.23534)+(sf_z*.26876)+(re_z*.43407)+(mh_z*.48581); run; data SF36; set SF36; PCS=(prepcs*10)+50; MCS=(premcs*10)+50; run;