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
Can rangestat or asrol solve this problem? creating statistics within industry in a rolling fashionDear All I have panel data that includes year, quarter, month and week, firm, industry, and (firm) …
Long table and wide tableHi , all! If I have two sheets ,sheet1 shows every students‘ score got in the exam and sheet2 contai…
Overall CI for a multileveled independent variable in a binomial logistic regressionHello, I'm trying to get an overall CI for an independent variable in a binomial logistic regression…
date and timeHi! i want to make a dummy variable that takes the value 1 if we observe a sale after a certain date…
Replacing valuesHi, I have a column containing different number and weights for grocery products (weights). Some pr…
Subscribe to:
Post Comments (Atom)
0 Response to Generating new variable
Post a Comment