Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Martyn Sherriff <statams48@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: how recode a positive value on a variable to a particular negative value |
Date | Fri, 28 Sep 2012 16:42:58 +0100 |
Erik, It works for me: . list +------+ | year | |------| 1. | 1990 | 2. | 1991 | 3. | 1990 | 4. | 1992 | 5. | 1993 | +------+ . recode year (1990 = -156) (1991= -144) (1992 = -100) (year: 4 changes made) . list +------+ | year | |------| 1. | -156 | 2. | -144 | 3. | -156 | 4. | -100 | 5. | 1993 | +------+ What error message do you get? Martyn On 28 September 2012 16:26, Erik Aadland <erikaadland@hotmail.com> wrote: > Dear Statalist. > I am trying to recode positive values on a specific variable into particular negative values. > e.g: > recode year (1990 = -156) (1991= -144) > and so on. > However, recode does not allow a negative value it seems. > Any input on this problem would be very appreciated. > Regards, > Erik. > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/