Hello, I have two variables, IS and Code. I would like IS to take on different values depending on what Code is. For example, I would like IS to equal 10401 if Code = 10085, 10087, 10090, 10091, 10095, or 60031. I would like IS to equal 10402 if Code = 10094, 10164, 60027, 60029, 60032, 60033 or 60034.
In this way I am trying to map about 900 Code values to about 100 IS values. Is there a relatively quick way I can do this using loops and groups instead of doing replace IS over and over again? I am very new to Stata and do not have much experience.
Related Posts with Creating new var w/ multiple values of another var
Increasing the gap between bar charts- Twoway barHi everyone, I was wondering if anyone could help me with increasing the gap between the bar charts…
Want to do many regressions using ivreg2 with different variables and add them all to the results tableWant to do many regressions using ivreg2 with different variables and add them all to the results ta…
In which parentheses (gmmstyle() or ivstyle()) should I insert my explanatory variables? Hi. I'm estimating a regression between municipal GDP per capita - as a dependent variable - and mu…
Interpretation coefficients fixed-effects model when time dummies are includedDear community! I need your help I have been reading many posts in this forum and generally on the…
Graph: text not centered within textboxTwo times I am trying to write text within a textbox into a graph. However, although the commands fo…
Subscribe to:
Post Comments (Atom)
0 Response to Creating new var w/ multiple values of another var
Post a Comment