Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Help with String Variables


From   metienne <metienne@jewel.morgan.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Help with String Variables
Date   Tue, 2 Sep 2003 21:59:53 -0400

Dear Statalisters
I am trying to recode a string variable and am having a hard time.
My command is as follows:
gen str8 race= PT_RACE
this command worked, I then tried to recode using the following command:
recode race=1 if PT_RACE==RAC101 (the race variable is coded as RAC101,
RAC102, etc.)
when I put this command in it reads:
=exp not allowed


what am I doing wrong? please help,
thanks

*
*   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/



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