Dear all,
Suppose we have string variable Y, and we would like to replace
variable X when variable Y contains certain characters such as
"Dec".
In other words, we want to write;
replace X="m12" if Y (contains "Dec")
replace X="m11" if Y (contains "Nov")
replace X="m10" if Y (contains "Oct") .
How can I write the latter part of command?
Please note Y can be Dec123abc, 456Novpqr, and zzz789Oct.
Thank you in advance.
--
FUKUGAWA Nobuya, Ph.D.
[email protected]
*
* 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/