Bookmark and Share

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]

st: How to check whether a string variable contains some characters


From   Bersant Hobdari <[email protected]>
To   [email protected]
Subject   st: How to check whether a string variable contains some characters
Date   Fri, 25 May 2012 23:38:21 +0200

Dear All,

I am working with a firm level data set, which contains, among other
things, data on firm names and place of incorporation. This latter
variable has a lot of missing values, which I would like to fill in to
the extent possible by using the firm name variable. More
specifically, if the firm name contains certain information, let say
the extension GHMB, I would infer that the firm is incorporated in
Germany. I am trying to use the "if" command to perform this operation
but I keep getting an error message. Can this command be applied in
this occasion? If not, is there any other command that can check
whether a string variable contains certain characters?

Best regards,
Berssant


Bersant Hobdari
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index