****************************************************************** *STATA syntax code for the computation of index* *values with the Thai value set (TTO)* ******************************************************************; gen mo = 0 replace mo = 1 if mobility == 2 replace mo = 2 if mobility == 3 gen sc = 0 replace sc = 1 if selfcare == 2 replace sc = 2 if selfcare == 3 gen ua = 0 replace ua = 1 if activity == 2 replace ua = 2 if activity == 3 gen pd = 0 replace pd = 1 if pain == 2 replace pd = 2 if pain == 3 gen ad = 0 replace ad = 1 if anxiety == 2 replace ad = 2 if anxiety == 3 gen m2 = 0 replace m2 = 1 if mobility == 3 gen p2 = 0 replace p2 = 1 if pain == 3 gen a2 = 0 replace a2 = 1 if anxiety == 3 gen n3 = 0 replace n3 = 1 if mobility == 3 | selfcare == 3 | activity == 3 | pain == 3 | anxiety == 3 gen EQ_index = 1 - 0.202 - (0.121 * mo) - (0.121 * sc) - (0.059 * ua) - (0.072 * pd) - (0.032 * ad) - (0.190 * m2) - (0.065 * p2)- (0.046 * a2)- (0.139 * n3) replace EQ_index = 1 if mobility == 1 & selfcare == 1 & activity == 1 & pain == 1 & anxiety == 1 replace EQ_index = round(EQ_index, .001)