Hello,

I would appreciate your helping recoding multiple variables into a new variables with 4 levels but using certain conditions for each level. I have 2 variables, (VigPA, ModPA), each with a range of 0-1260 mins, and I need to recode them into one new variable (PAgroup) with specific conditions for each level.

That is:

Level 4 (Highly Active) will include participants which performed more than 300 mins of ModPA or more than 150 mins of VigPA.

Level 3 (Active) will included participants which performed between 150 and 300 mins of ModPA or between 75 and 150 mins of VigPA.

Level 2 (Insufficiently Active) include participants which performed between 0 and 150 mins of ModPA or between 0 and 75 mins of VigPA.

Level 1 (Inactive) include participants which performed 0 mins of ModPA or 0 mins of VigPA.

I've tried writing my own syntax and Im able to successfully code the conditions for level 4 but not for the rest. I've included my code below for reference. This is my first time using SPSS and would appreciate any advice on how I can effectively achieve this goal. Thank you in advance for your time!

DATASET ACTIVATE DataSet1.

DO IF (modPA >= 300 | vigPA >= 150).

COMPUTE PA_TEST=4.

ELSE IF (150

More Alejandro Gallego's questions See All
Similar questions and discussions