Statalist


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

Re: st: replace observation values


From   Nikolaos Pandis <[email protected]>
To   [email protected]
Subject   Re: st: replace observation values
Date   Sun, 12 Jul 2009 12:27:15 -0700 (PDT)

Thank you very much Uli.
Best wishes,
Nick

--- On Sun, 7/12/09, Ulrich Kohler <[email protected]> wrote:

> From: Ulrich Kohler <[email protected]>
> Subject: Re: st: replace observation values
> To: [email protected]
> Date: Sunday, July 12, 2009, 2:56 PM
> Am Sonntag, den 12.07.2009, 03:58
> -0700 schrieb Nikolaos Pandis:
> > Hi to all.
> > 
> > Would you please help me with the following question:
> > 
> > In a dataset under one variable I have two names for
> the same type of observation (ie CASE-CONTROL AND
> CASE_CONTROL). 
> > How would I change all in CASE_CONTROL without having
> to do each one individually?
> 
> If your variable is a string variable type
> 
> . replace varname = "CASE_CONTROL" if varname ==
> "CASE-CONTROL"
> 
> where varname ist the name of your variable. 
> 
> If it is a numeric variable with value labels attached to
> it use the
> respective numerical numbers instead of the strings, or
> type
> 
> . replace varname = "CASE_CONTROL":varnamelabel ///
>        if varname ==
> "CASE-CONTROL":varnamelabel
> 
> where varname is the name of your variable and varnamelabel
> is the name
> of the value label attached to it. 
> 
> 
> Many regards
> Uli
> 
> 
> 
> -- 
> [email protected]
> +49 (0)30 25491-361
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index