/* coded by Janel Hanmer, July 2005 Updated 2007 after personal communication with John Brazier and Quality Metric about imputing level location Incorporated some code from Jenny Beuchner*/ /* This version of the SF-6D uses 11 questions from the SF-36 version 1. This code presumes they are numbered and coded as follows: sf3 = vigorous activities where 1="limited a lot" to 3="not limited at all" sf4 = moderate activities where 1="limited a lot" to 3="not limited at all" sf12 = bathing and dressing where 1="limited a lot" to 3="not limited at all" sf15 = physical limited work where 1="yes" and 2="no" sf18 = emotional accomplish less where 1="yes" and 2="no" sf21 = bodily pain where 1="none" to 6="very severe" sf22 = pain interferes with work where 1="not at all" to 5="extremely" sf24 = nervous where 1="all the time" to 6="none of the time" sf27 = energy where 1="all the time" to 6="none of the time" sf28 = downhearted and blue where 1="all the time" to 6="none of the time" sf32 = social activities where 1="all the time" to 5="none of the time" This code presumes that all missing, "don't know", and "refused" responses are coded as "." This code uses the Consistent model (Column 2, Table 4) from Brazier JE, Roberts J. The estimation of a preference-based measure of health from the SF-12. Medical Care. 2004; 42: 851-859 */ /* insert the location of your dataset below */ data SF6D; set 'C: . . .'; run; /* first, recode questions 24, 27, and 28 to have 5 response categories instead of 6 */ data SF6D; set SF6D; rand=uniform(-1); sf24r=sf24; If (sf24=2) then sf24r=2 ; If (sf24=3 and rand <0.5) then sf24r=2 ; If (sf24=3 and rand>=0.5) then sf24r=3; If (sf24=4) then sf24r=3 ; If (sf24=5) then sf24r=4 ; If (sf24=6) then sf24r=5 ; sf27r=sf27; If (sf27=2) then sf27r=2 ; If (sf27=3 and rand <0.5) then sf27r=2 ; If (sf27=3 and rand>=0.5) then sf27r=3; If (sf27=4) then sf27r=3 ; If (sf27=5) then sf27r=4; If (sf27=6) then sf27r=5 ; sf28r=sf28; If (sf28=2) then sf28r=2 ; If (sf28=3 and rand <0.5) then sf28r=2 ; If (sf28=3 and rand>=0.5) then sf28r=3; If (sf28=4) then sf28r=3 ; If (sf28=5) then sf28r=4 ; If (sf28=6) then sf28r=5 ; run; /*form the dimentions from Table 1 */ data SF6D; set SF6D; SFPhys=.; IF (sf3=3 and sf4=3 and sf12=3)then SFPhys = 1 ; IF (sf3 in (1,2) and sf4=3 and sf12=3) then SFPhys = 2 ; IF (sf4=2 and sf12=3) then SFPhys = 3; IF (sf4=1 and sf12=3) then SFPhys = 4; IF (sf12=2) then SFPhys = 5 ; IF (sf12=1) then SFPhys = 6 ; SFRole=.; IF (sf15=2 and sf18=2) then SFRole = 1; IF (sf15=1 and sf18=2) then SFRole = 2; IF (sf18=1) then SFRole = 3; /* if sf18=1, then same SF-6D score will be assigned regardless of the response to sf-15, so I have collapsed Role levels 3 and 4 */ SFSocial=.; IF (sf32=5) then SFSocial = 1 ; IF (sf32=4) then SFSocial = 2 ; IF (sf32=3) then SFSocial = 3 ; IF (sf32=2) then SFSocial = 4 ; IF (sf32=1) then SFSocial = 5 ; SFPain=.; IF (sf21=1 and sf22=1) then SFPain = 1 ; IF (sf21 in (2,3,4,5,6) and sf22=1) then SFPain = 2 ; IF (sf22=2) then SFPain = 3; IF (sf22=3) then SFPain = 4; IF (sf22=4) then SFPain = 5; IF (sf22=5) then SFPain = 6; SFMental=.; IF (sf24r=5 or sf28r=5) then SFMental=1 ; IF (sf24r=4 or sf28r=4) then SFMental=2 ; IF (sf24r=3 or sf28r=3) then SFMental=3 ; IF (sf24r=2 or sf28r=2) then SFMental=4 ; IF (sf24r=1 or sf28r=1) then SFMental=5 ; IF (sf24<1 or sf24>5) then SFMental=.; IF (sf28<1 or sf28>5) then SFMental=.; SFVital=.; IF (sf27r=1) then SFVital = 1 ; IF (sf27r=2) then SFVital = 2 ; IF (sf27r=3) then SFVital = 3 ; IF (sf27r=4) then SFVital = 4 ; IF (sf27r=5) then SFVital = 5 ; run; /*create MOST category if any dimention is at its worst state */ data SF6D; set SF6D; most=0; if SFPhys=4 or SFPhys=5 or SFPhys=6 or SFRole=3 or SFRole=4 or SFSocial=4 or SFSocial=5 or SFPain=5 or SFPain=6 or SFMental=4 or SFMental=5 or SFVital=4 or SFVital=5 then most=1; run; /*assign decriments based on level from column 2 in table 4 and calcuate score*/ data SF6D; set SF6D; If (SFPhys=1) then pf1 = 0 ; IF (SFPhys=2) then pf1 = -.035 ; IF (SFPhys=3) then pf1 = -.035 ; IF (SFPhys=4) then pf1 = -.044 ; IF (SFPhys=5) then pf1 = -.056 ; If (SFPhys=6) then pf1 = -.117 ; If (SFRole=1) then rl1 = 0 ; IF (SFRole=2) then rl1 = -.053 ; IF (SFRole=3) then rl1 = -.053 ; IF (SFRole=4) then rl1 = -.053 ; IF (SFSocial=1) then sc1 = 0 ; IF (SFSocial=2) then sc1 = -.057 ; IF (SFSocial=3) then sc1 = -.059 ; IF (SFSocial=4) then sc1 = -.072 ; IF (SFsocial=5) then sc1 = -.087 ; If (SFPain=1) then pn1 = 0 ; IF (SFPain=2) then pn1 = -.042 ; IF (SFPain=3) then pn1 = -.042 ; IF (SFPain=4) then pn1 = -.065 ; IF (SFPain=5) then pn1 = -.102 ; If (SFPain=6) then pn1 = -.171 ; If (SFMental=1) then mh1 = 0 ; IF (SFMental=2) then mh1 = -.042 ; IF (SFMental=3) then mh1 = -.042 ; IF (SFMental=4) then mh1 = -.100 ; IF (SFMental=5) then mh1 = -.118 ; IF (SFVital=1) then v1 = 0 ; IF (SFVital=2) then v1 = -.071 ; IF (SFVital=3) then v1 = -.071 ; IF (SFVital=4) then v1 = -.071 ; IF (SFVital=5) then v1 = -.092 ; if most=0 then mst1 = 0; if most=1 then mst1 = -.061; SFIndex = 1 + pf1+rl1+sc1+pn1+mh1+v1+mst1 ; run; data sf6d; set sf6d; if pf1=. or rl1=. or sc1=. or pn1=. or mh1=. or v1=. or mst1=. then SFIndex=.; run;