Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • WHO QOL Bref STATA syntax

    Dear all,

    I need to analyze a dataset of WHO Quality of Life Bref scores (https://apps.who.int/iris/bitstream/...HOQOL-BREF.pdf). There seems to be an SPSS syntax to help preparing the data for analysis. I'm wondering if there is similar thing available in STATA.

    Thank you in advance for your time.

    Cheers,
    Vini

  • #2
    No I don't know of any Stata version. If you refer to those codes on page 10, this is the Stata equivalence. Please double check with the results you got from SPSS.

    Code:
    * 1) Check all 26 items from assessment have a range of 1-5 --------------------
    forvalues x = 1/26{
        replace Q`x' = . if Q`x' < 1 | Q`x' > 5
    }
    
    * 2) Reverse 3 negatively phrased items ----------------------------------------
    foreach x in 3 4 26{
        capture drop old_Q`x'
        gen old_Q`x'= Q`x'
        replace Q`x' = 6 - old_Q`x'
    }
    
    
    * 3) Comptue domain scores -----------------------------------------------------
    egen complete_1 = rownonmiss(Q3 Q4 Q10 Q15 Q16 Q17 Q18)
    egen complete_2 = rownonmiss(Q5 Q6 Q7 Q11 Q19 Q26)
    egen complete_3 = rownonmiss(Q20 Q21 Q22)
    egen complete_4 = rownonmiss(Q8 Q9 Q12 Q13 Q14 Q23 Q24 Q25)
    
    egen dom1 = rowmean(Q3 Q4 Q10 Q15 Q16 Q17 Q18)     if complete_1 >= 6
    egen dom2 = rowmean(Q5 Q6 Q7 Q11 Q19 Q26)          if complete_2 >= 5
    egen dom3 = rowmean(Q20 Q21 Q22)                   if complete_3 >= 2
    egen dom4 = rowmean(Q8 Q9 Q12 Q13 Q14 Q23 Q24 Q25) if complete_4 >= 6
    
    foreach x in 1 2 3 4{
        replace dom`x' = dom`x'*4
    }
    
    * 4) Delect cases with >20% missing data ---------------------------------------
    egen total = anycount(Q1-Q26), values(1 2 3 4 5)
    keep if total >= 21
    
    * 5) Check domain scores -------------------------------------------------------
    summarize dom*
    
    * 6) Save data set -------------------------------------------------------------
    * Take the "*" away to uncomment it to save a new file name of your choice
    
    * save NEW_FILE_NAME, replace

    Comment


    • #3
      Hi Ken Chui , thanks a lot for this. I tested it and it worked! Thank you.

      Comment

      Working...
      X