Statalist


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

st: Wildcard for string variables


From   "Hugh Colaco" <hmjc66@gmail.com>
To   statalist <statalist@hsphsun2.harvard.edu>
Subject   st: Wildcard for string variables
Date   Thu, 17 Jul 2008 08:52:45 -0400

Hi Statalisters,

I am not sure how the string wildcard works. For example, I have a
string variable called "sequence" that has the following
observations:-

1. "Tim and Tom and Jane"
2. "Tim and Jane and Tom"
3. "Tom and Jane and Harry"
4. "Jane and Jill"

I want to generate a new variable that equals one if Tim is the first
name mentioned, and zero otherwise.

Thanks in advance,

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



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