I have a dataset with 8200 observations and 33 questions.
When any of the values for questions q1-q33 equals 9 (numeric), I want to set it to missing value (.)
I know I can write syntax in a data step:
if q1 = 9 then nq1 = .;
if q2 = 9 then nq2 = .;
etc....
Is there a better & less cumbersome way to this?
When any of the values for questions q1-q33 equals 9 (numeric), I want to set it to missing value (.)
I know I can write syntax in a data step:
if q1 = 9 then nq1 = .;
if q2 = 9 then nq2 = .;
etc....
Is there a better & less cumbersome way to this?