Dear All, Suppose the data set is
My command is
However, I need `d' to be missing for the 3rd and 7th observations. I wonder the command `cond()' can do this?
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float n int rep78 1 3 2 3 3 . 4 3 5 4 6 3 7 . 8 3 9 3 10 3 11 3 12 2 13 3 14 3 15 4 16 3 17 2 18 2 19 3 20 5 end
Code:
gen d = cond(rep78>2,1,0)

Comment