[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: ??: Handling string data
This isn't so. Simpler solutions using -strpos()- (or -index()-)
and -regexm()- were suggested promptly after the question
was posted. There is no need to go outside Stata, or to
use other software which the questioner may not even have access to.
> I think the simplest way is to use excel transfer the string
> into numbers 0,0,1...and add them to get y.
> I have tried to solve this myself with the reference, but no luck so
> far. My problem is to run a function on a string variable. This is
> the data that I have
> Variable X:
> I was tring to generate a dummy variable y=1 when x3 is contained in X
> and 0 otherwise. Is there a command to do this?
* For searches and help try: