Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Dummy Variable From a String


From   [email protected]
To   [email protected]
Subject   st: Dummy Variable From a String
Date   Mon, 20 Nov 2006 12:57:21 -0500

Hello-

I need to create a dummy variable from a string variable that contains 
both numbers and letters.  The string variable is a number sometimes 
followed by the letter 'c'.  For example:

1
2
3
4c
5c
6c

I need to create a dummy variable from this variable without destringing 
it.  Any ideas?

--
Michael Wilson
Consumer Education and Research
Consumer and Community Affairs 
Federal Reserve Board of Governors
[email protected]
(202) 452-2884
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index