Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Recode and Label problem

From   Rieza Soelaeman <>
Subject   st: Recode and Label problem
Date   Wed, 17 Oct 2012 01:49:04 -0500

Hi Malay,
This seems a very simple problem indeed.  You should drop the label
for v39 using -label drop [label name]- then re-create that label with
the new coding and assign accordingly.


On Tue, Oct 16, 2012 at 11:27 PM, malay biswas <> wrote:
> Dear All,
> Thank you for all the supports given to me by some of you in my
> earlier requests. Sincerely appreciated.
> I am having one small but nagging problem. I know that I am just one
> small command away of what I want - but it had alredy consumed quite a
> bit time.
> Problem:
> Good number of variables in my data were coded as 1( Yes) and 2 (No).
> (Problematic for logistic analysis)
> So I used the command: recode var39 2=0   (This command changes all my
> values (2) in the variable39 to 0. But while executing the command, it
> changes my label too and dsiplay 0. So again I use :
> label define var39 0 "No" 1 "Yes"
> It does not change the label in the data from zero to No. In all my
> analysis it shows Yes as Yes but No to 2. What I want is to code it as
> zero but label it as No.
> (var39 is my variable having two options: Yes(1) or No (2))
> I am not sure whether I have articulated the problem well.
> Thank you for your time.
> With regards
> Malay
> *
> *   For searches and help try:
> *
> *
> *
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index