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, statalist.org is already up and running.


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

st: Recode and Label problem


From   malay biswas <stata.malay@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Recode and Label problem
Date   Wed, 17 Oct 2012 09:57:44 +0530

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:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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