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

st: Stata Journal and piece of string variables


From   TEWODAJ MOGUES <tmogues@students.wisc.edu>
To   Stata _ <statalist@hsphsun2.harvard.edu>
Subject   st: Stata Journal and piece of string variables
Date   Sat, 20 Nov 2004 02:42:54 -0500

Nick,
I don't think that my do file is overly large because of repetitive 
programming, but one never knows, so I tried to look up your article. 
Unfortunately our university (of Wisconsin-Madison) does not seem to be 
subscribed to the journal, and it is not accessible via internet. 
Perhaps I'll try to have it sent to me by the school library. Meanwhile 
I'll use nested do files. 

Another question (I don't find lots of info on the search regarding 
string variables): Is there a way for me to refer to a piece of string 
var? Say there is a string var called -automob- with values redcar and 
bluecar. Suppose I want to do something like 
drop if automob == " * car"
thus gettingn rid of rows where the values are redcar or bluecar
CLearly this syntax doesn't work, but is there a way to do something in 
this spirit without too complicated splitting-up of variables?

Thanks,
Tewodaj

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
Tewodaj Mogues
Dept. of Agricultural and Applied Economics
University of Wisconsin - Madison
427 Lorch St. #317, Taylor Hall
Madison, WI 53706
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index