SF36rec
function recodes to a binomial form the 0-100 original standardized scores of the dimensions provided by the Short Form-36 Health Survey (SF-36) based on Arostegui et al. (2013).SF36rec(x,k)
x
. These are the dimensions depending on the k
value:k=1
-> Physical functioning
k=2
-> Role physical
k=3
-> Body pain
k=4
-> General health
k=5
-> Vitality
k=6
-> Social functioning
k=7
-> Role emotional
k=8
-> Mental health
SF36rec
function performes the cited recoding methodology to the specified SF-36 dimension. It has two inputs. The first one is the dimension that will be recoded, and the second one identifies which SF-36 dimension is.set.seed(2)
# We simulate a variable bounded between 0 and 100.
BodyPain <- runif(1000,0,100)
# We specify that the simulated dimension corresponds
# with body pain dimension.
k <- 3
# We perform the recoding.
BodyPain.rec <- SF36rec(BodyPain,k)
Run the code above in your browser using DataLab