Quantcast

String Variable

classic Classic list List threaded Threaded
1 message Options
yj
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

String Variable

yj
This post has NOT been accepted by the mailing list yet.
Hello, I'm a new user of STATA.

I would like to generate a new variable if a concatenated string variable contains the character I want.

eg.

observation            string variable
1                          ABC
2                          BC
3                          AC
4                          AFC
5                          A

I would like to create a new variable for observations where the string variable contains the letter A (its position in the string variable is irrelevant).

Please help, thank you!

Loading...