Dear Forum Members,
I hope someone can help me out or point me in the right direction. I have a data file with 300 subjects and quite a few variables, most of them discretely coded 1-6. Here is what I would like to do:
1) if any variable of let's DP1, DP2, DP3, .... DP7 is 1, 3, or 5 make target_var1 = 1
2) if all of the above (DP1-DP7) are $sysmis then make target_var1 = $sysmis
3) if none of these are true make target_var = 0
Ideally, I would like to be able to adapt item 2) to something that says: "if more than i.e. 4 of DP1-7 contain $sysmis then make i.e. target_var 2 = $sysmis" or some other way to designate too few data points.
so finally, at the most complex I might also need to have something like:
IF in DP1-7 at least two have the value 4 and no more than i.e. 3 are $sysmis, then give target_var3 = 1
If anyone could help out, I would be very very grateful.
All the best,
J.
------------------------------
johannes achenbach
------------------------------
#SPSSStatistics