I am working with a dataset from a poll of registered voters. For each observation (one voter), respondents were asked to use "feeling thermometers" to indicate their attitudes towards a series of different candidates. Each feeling thermometer variable is coded as a numeric variable with an integer value of 1, 2, 3, or 4. I am looking for a way to create an indicator variable for each observation to denote which feeling thermometer variable has the highest value (in order to eventually determine a correlation between positive attitudes and voting behavior). I haven't been able to figure out how to create such an indicator variable with the limited Stata knowledge I currently have. Advice appreciated!
Related Posts with Generating an indicator variable to denote the highest value from a set of variables in an observation
survey data help: dropping observationsHello, I am new to stata and would appreciate your help. I have ten crops under var2. I want to dro…
Year fixed effectsHello everyone, I am running a panel data regression model in which I observe 4 time periods and 66 …
Controlling for averages of lagsDear Stata community, I'm using time series regression using data of 100 countries over 22 years to…
regression result only except first variableHello When I regress as below, why don't I get the result for the first variable and how can I fix …
GMM: Multiple lagged moment conditions Hello everyone! I am a complete newbie to Stata and am thus really grateful for any help. I am curr…
Subscribe to:
Post Comments (Atom)
0 Response to Generating an indicator variable to denote the highest value from a set of variables in an observation
Post a Comment