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
Fitting the basic AIDS model using nlsurHi, I wrote a program to estimate almost ideal demand system with demographic variables. I modifie…
GLM model with Gamma distribution and log link - residualsDear all, I am new to running the GLM model in Stata. I have healthcare data which is positively ske…
Counting values in long datasetHello, I have a long dataset wherein each observation represents either a hospitalization or ED vis…
Implementing Wild Bootstrap T Standard Errors in Regression OutputHello everyone I am investigating the effects of an exogenous economic shock on the unsecured credi…
Comparing the regression Coefficients in a Fama-Macbeth Regression- t-statisticDear Stata Community: I am trying to estimate the Fama-Macbeth regression. sort year egen nogap=grou…
Subscribe to:
Post Comments (Atom)
0 Response to Merging observations into one variable
Post a Comment