Hello,
I am relatively new to STATA, with only a couple months experience and not much string experience.
I want to create a variable that stores 10 separate different words.
Ex:
animal:
cat
dog
lizard
bird
etc
I tried doing something like
gen animal = "cat" + " " + "dog"....
but that just gave me:
animal = cat dog lizard bird
and the results aren't all split up. I am doing this so that I can basically use this string value as the qualifier for an f statement that will do a command when the string is equal to one of the word values.
Thanks!
Related Posts with Creating a string variable with multiple different word values
Predictions with and without BLUP after melogitI am attempting to calculate predictions after a melogit model with and without best linear unbiased…
drop all zero variablesHello, I have created dummy variables for industries, resulting in 35 dummies. However, I deleteted…
Spell-type data for Cox regressionHello, dear users of the Stata program. Now I'm conducting a reserach on duration of unemployment. I…
Blinder-Oaxaca decomposition for probit modelHello, I have assessed online materials available for the decomposition of both linear and non-line…
Replacing missing values in a panel dataDear All, hope you are all safe and in good health. Kindly I have balanced panel data with missing…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a string variable with multiple different word values
Post a Comment