I would like to assign a string variable to all in a group. I want to be able to assign "IA" if any member of the group has IA. I want to create the values in newvalue. My data looks like this
id. val. newvalue
1. IA. IA
1. II. IA
1. IA IA
2. II . (missing since no IA for person 2)
2. II .
2 ID .
3. II. IA
3. II IA
3 IA. IA
4. . IA
4. IA. IA
4 ID. IA
Related Posts with Assign string variable to all in group
Mixed model interaction command reports error in Mac version of stataHi, this is my first time posting. I have been using stata for sometime now and had no problem in ru…
how to run a quantile regression for estimating panel data models using instrumental variable?Hi I am working on an economic problem using the quantile regression model of panel data. I need to …
-atmeans- option with marginsMy question is about best practices while computing marginal effects. When should the option -atmean…
generating a new variable that is the result of extracting individual data points from a datasetHello I have data for historical breast cancer mortality rates for countries and I'd like to extract…
Flipping tables using eststo.Hi, I have a question concerning the construction of tables using eststo and esttab and posting them…
Subscribe to:
Post Comments (Atom)
0 Response to Assign string variable to all in group
Post a Comment