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
Predicted probabilities after biprobitHi everyone, I am using a biprobit model with two dichotomized outcome variables (health and mortali…
question about reg a b c i.year, robusti have a question about this command reg a b c i.year, robust. what is the diffrence between using n…
Margins and retaining only a subset of pairwise comparisonsLet's imagine I fit the following model, using a stock Stata dataset. Code: use http://www.stata-…
Latex-tabulate a combined matrix of coefficients and of t-statisticsI have many regressions (one per year, over 15 years) for 4 outcome variables. I have created 2 [15x…
Difference-in-Difference - Collinearity ProblemHi all, I'm currently an undergraduate student and very new to STATA, I apologize for any "stupid" …
Subscribe to:
Post Comments (Atom)
0 Response to Creating a string variable with multiple different word values
Post a Comment