[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Dichotomizing a Variable
Suppose I have a variable, abc that consists of: 1 2 3 4 5 5 6 7 8 9. I want
to dichotomize the variable at the median.
generate abcnew = 0
replace abcnew = 1 if abc > 5
What statement do I write that assigns one of the 5s a 0 and the other 5 a 1
Thanks for the assistance.
* For searches and help try: