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
Texdoc help file for graphs not workingI am trying to replicate the examples given in the help file for texdoc: To this end, I compiled th…
Percentage change of daily exchange rate dataHello everyone, I am writing my dissertation thesis on the impact of Brexit negotiations on the val…
How to calculate NRI after multiple imputation (mi impute mvn)hello everyone, I'm a new Stata user and expect some suggestions.I have done the code "mi estimate:l…
IVProbit postestimation testI am using MLE to estimate my IVProbit, which involves estimating a simultaneous system of equations…
egen xtileHey! I am trying to do the following, egen tier=xtile(diff), nq(3) by(id yq) yq is the year and qu…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a string variable with multiple different word values
Post a Comment