[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Changing  positive values to negative in Stata
I have a continuous variable with positive, negative, and zero values 
and also missing values(.). I would like to know if anyone has an easy 
Stata code/command to change just the positive values to a negative 
(change the sign: 4.4567 to -4.4567) for just a particular subgroup of 
the total (n=661 out of over N=4,000). Within this subgroup (which I can 
sort, but not by id) there already are a few appropriately negative 
values in place.
Thank you,
Suzy
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/