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
repeating random sample and averaging the resultsHi all, I'm trying to do an analysis of covariance (ANCOVA) for a sample of all non-financial firms…
How to generate a variable with with fixed correlations to an existing variable which already has a uniform distributionHi, I have generate a variable which I have called X, it has a uniform distribution like this: gen x…
building a categorial variable based on confidence intervallsDear all, I try to part a continous variable in categories using the 50% CI. Literture ref: "The a…
building a categorial variable based on confidence intervallsDear all, I try to part a continous variable in categories using the 50% CI for age groups. Litert…
Ttest or ranksum approach for panel dataHi there, I was hoping you could help. I would like to compare the means between 2 samples for pane…
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