I have the following data:
#ID DV MDV#
1 2 1
2 3 0
3 0 0
4 . 0
I want the following: Whenever DV column has a non-zero number, the MDV column should be 0 and vice-versa. If DV has a zero value (or missing value), MDV should be 1 for that ID.
#ID DV MDV#
1 2 0
2 3 0
3 0 1
4 . 1
How do I code this?
.in it?NAto values that are.?