Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Recode and Label problem


From   Rieza Soelaeman <[email protected]>
To   [email protected]
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.


HTH,
Rieza



On Tue, Oct 16, 2012 at 11:27 PM, malay biswas <[email protected]> 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:
> *   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index