I used a collapse command to count the number of occurrences linked to particular survey responses:
collapse (count) qn1b if qn1b == 4, by (hhid)
I then saved this as a separate data file (data2) - but I'm having trouble merging it back together with my initial data set (data1) while preserving missing as well as 0 values. I'm new to merging data sets and not sure what I'm doing wrong in the merge.
Related Posts with Simple merge question
Appending datasets by keeping the common variabels onlyHi, I want to append datasets for various countries, each of which contains variables that others do…
Can I have two lines and one histogram in the same graph?Hi all, I would like to draw a graph with three information: 1. Age on y-axis(1) 2. Gender on y-axi…
Replace missing values by system-missing '.' if label value is "Manquant"Hello, I have a survey where most variables have a different code for missing values, I need to uni…
ARDL short run and long run InterpretationHi everyone, This is the first time I use Stata for my paper so I am confused a lot. I’m doing my re…
Creating categories and line plotsI would like to create 3 categories -- US, Non-US, and Non-US Developed -- using the variable countr…
Subscribe to:
Post Comments (Atom)
0 Response to Simple merge question
Post a Comment