Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(A B) 24 . 24 . 24 . . . . . . . . . . . . . . . . . . . . . . . . . 240 . 240 . 240 . 240 . 240 . 450 630 450 630 450 630 . . . . . . . . . . . . . 180 . 180 . 180 90 150 90 150 90 150 90 150 240 540 240 540 240 540 240 540 240 540 240 540 90 120 90 120 90 120 90 120 90 120 90 120 . . . . . . 600 600 600 600 600 600 . . . . 350 . 350 . 350 . 350 . 350 . . . . . . . . . . . 480 480 480 480 480 480 480 480 480 480 480 480 160 . 160 . 160 . 160 . . . . . . . . . 180 300 180 300 180 300 180 300 . 540 150 . 150 . 150 . . 240 . 240 . 240 . 1800 . 1800 . 1800 . 1800 . 1800 1500 1800 1500 1800 1500 1800 1500 1800 end
Command to generate a dummy
if both A and B are non-zero (or non-missing value) then dummy is 1
if exactly one of A and B is zero or missing value (and the other is nonzero or non-missing value) then dummy is 0
Comment