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]
Re: st: how do you re-categorize a string variable?
From
daniel klein <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: how do you re-categorize a string variable?
Date
Wed, 24 Apr 2013 09:20:52 +0200
Since you will probably end up needing an indicator variable you could
also go with
g byte hyper = !strpos(hypertension, "no") if !mi(hypertension)
Best
Daniel
--
I have a dataset with the string variable hypertension. Observations
of the variable hypertension can be mild, moderate, and severe or no
hypt (no hypertension):
[...]
I would like to create a new variable, hypertension_status, which
‘distingushes’ if an individual is hypertensive or not.
*
* 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/