Dear All, I have this data set:
How can I replace 1 in zz* and other* with 0.5 when split=1? Thanks.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(id split) byte(zz1 zz2 zz3 zz4 zz5 zz6 other1 other2 other3 other4 other5 other6) 1 1 0 0 0 1 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 1 0 0 0 0 0 1 3 0 0 0 0 0 0 1 0 0 0 0 0 1 4 0 0 0 0 0 0 1 0 0 0 0 0 1 5 1 0 0 0 0 1 0 0 0 1 0 0 0 6 0 0 0 0 0 0 1 0 0 0 0 0 1 7 0 1 0 0 0 0 0 1 0 0 0 0 0 8 0 0 0 0 0 0 1 0 0 0 0 0 1 9 0 0 0 0 0 0 1 0 0 0 0 0 1 10 0 0 0 0 0 0 1 0 0 0 0 0 1 end
Comment