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

st: Using wildcards with string values of a variable


From   Joanna Carrington <[email protected]>
To   [email protected]
Subject   st: Using wildcards with string values of a variable
Date   Fri, 13 Jan 2006 12:08:44 +0000

Hi Statalist users,

I am using the metatrim command (sbe39.2) and saving the results in a new dataset. I would like to create my own plots from the new dataset and need to differentiate between the original estimates and those generated by the metatrim command. The new dataset contains the variable 'id' which contains string values "fill1", "fill 2" etc and "study 1", "study 2" etc. I have tried the following commands:

gen id2=id
replace id2 "filled" if id=="fill*"

which didn't work. I cannot find any reference of a wildcard being used in such a situation, is it possible? I'm sure there is a very simple solution to my problem so I apologise in advance!

Thank you for your help,

Joanna

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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