Hi.
I have made a survey experiment with two experimental groups. In Stata I now have two variables (var1 and var2) for each group's opinion to a given question (values from 1 to 7).
I now want to create a new third variable that indicates if the respondent is part of group 1 or 2. So all members of var1 should have value 1 and all members of var2 should have value 2.
I guess it is quite simple, but I can't really figure out how to do it.
Hope someone is able to help. Thank you!
- Nanna
Related Posts with Generating new variable
Counting and categorizing the number of adults in the household using survey dataGood day, I am interested in counting and categorizing the number of adults in the household into t…
Chi-square-Tests: adjusted residuals vs. standardized residualsDear Statalisters, I performed a Chi-square test (see code below), which was not significant with m…
xtgraphGood morning, I use this command. I would like to ask you how can I chiange the colours of the line…
An empirical question of multilevel models; and how to buid a graph like this one in StataDear Statalist, I am using Stata 15.1 and I am estimating a three level model (time nested in firms…
Arch, Garch Tarch model and post estimation in PANEL DATAGood morning. I'm am running a model with Arch, T arch and Garch effects over stock returns and with…
Subscribe to:
Post Comments (Atom)
0 Response to Generating new variable
Post a Comment