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
margins "not estimable"Hi, I am trying to graph my results using the margins command, however, it returns the "not estimab…
combining and/or expressionsGood afternoon, I have a panel dataset with observations from different countries and different year…
ivregress for binary variablesHi All. I am analyzing data from a trial looking at the impact of treatment on prognosis (i.e. dead…
Replicate xi: results using xtregHello everyone. Hope you all are well. I am looking at this regression and dataset which was used …
Help me with fixed effect model please! Many thanksHello I am planning to run a fixed effect model in stata. However I would like to discuss here 1) wh…
Subscribe to:
Post Comments (Atom)
0 Response to Generating new variable
Post a Comment