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/