dataset: subj q1 q2 q3 q4 q5 q_total newvar 1 1 3.1 2.1 1 1 8.2 2 . . . . . . 3 1 1.2 1 0 1.1 4.3 4 0 1 1 .6 1 4.6 i would like to create a new variable (newvar), where if q1 <=1 and if q2 is <= 1 and if q3 is <=1 and if qtotal is <= 8, then newvar =1 , otherwise newvar =0, but if q1 through qtotal is ., then newvar is . (for my data set, if one value is missing in a row that means all values are missing for that row...just an fyi---look at subj 2) so newvar would look like: newvar 0 . 0 1
... View more