Hej,
Try -replace- instead of -recode-
==========================================
replace var2 ="EFV" if var =="EFA"
replace var2 ="EFV" if var =="Efavirenz"
==========================================
Olalekan Uthman
--- Ziad El-Khatib <[email protected]> wrote:
> Dear STATA lister
> basic question, i am trying to recode column with
> list of names that
> have been entered in different ways.
>
> var1
> EFA, Panadol
> EFV, Panado
> Antibiotics, Efavirenz
>
>
> I am trying to generate new variable var2 to have
> one value for EFV
> gen var2 = var1
> recode var (?EFA? = EFV) (?EFV? = EFV) (?Efavirenz?
> = EFV)
>
> Recode does not accept text, any tips how to go
> around it?
>
>
> Thank you in advance and best regards
> ziad
>
> *
> * For searches and help try:
> *
> http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/