I am working with survey data. Respondents are given the option to respond in different units for some questions. For example, take weight: respondents may choose to either respond in kgs, or lbs. Thus, I have two separate variables that measure the same concept (i.e. variable 1 is weight_kgs, and variable 2 is weight_lbs), but each unique ID will have an observation either recorded in kgs, or in lbs.
After converting the observations to the same unit (i.e. both will be in kgs), I would like to create one variable that contains both the observations originally recorded as kgs (weight_kgs), as well as those just converted from lbs.
I tried to merge the variables, but that did not work. Any way to do this on Stata?
Related Posts with Merging observations into one variable
Panel Data - treatment*for group data based on within group characteristicsHello, I am interested in assigning a treatment to a firm if it was domestic (foreign=0) in year 20…
-domin- (SSC): computing time /max. number of independent variablesHi everybody, I am using Stata 16.0 and I am trying to perform dominance analysis using the -domin-…
How to create a percentage variableHello, I have a categorical variable for ethnicity. When I tabulate it I can see that there are pe…
Dynamic Panel ModelsHi, I try to build model in Stata with xtabond. When I should use option vce(robust)? Or when shoul…
Using "lincom" after "margins"Hello. I have a question with respect to using the lincom command after the margins command. Specif…
Subscribe to:
Post Comments (Atom)
0 Response to Merging observations into one variable
Post a Comment