Hi,

I have datasets from 3 surveys with the first one containing variables like unique ID, age, BMI plus some health-related questions. The other two datasets (round 2 and 3) have all the variables but age and sex, as they are the same as in the first round. I have to append the 3 datasets together such that the data on age and BMI get filled for the last two rounds as well.

Thank you for your suggestions!

Here is sample data for round 1:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float ID int(age bmi) byte(we1 we2 we3 we4)
1 14 48 0 1 0 0
2 19 43 0 0 1 0
3 21 38 0 0 0 1
4 35 36 0 0 0 1
5 25 36 0 0 1 0
6 29 34 0 0 0 1
7 20 40 0 0 1 0
end



Data for round 2:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float ID byte(we1 we2 we3 we4)
1 1 0 0 0
2 0 0 0 1
3 0 1 0 0
4 0 0 0 1
5 0 0 0 1
6 0 0 0 1
7 0 0 0 1
end

Data for round 3:
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float ID byte(we1 we2 we3 we4)
1 0 0 1 0
2 0 1 0 0
3 0 0 1 0
4 0 0 1 0
5 0 1 0 0
6 0 0 1 0
7 0 0 1 0
end