Dear Stata list,
I have household level 24 hours food consumption data (by Menu) including ingredients in one data set.
In another data set, for the same household, I also have individual level food consumption data only by Menu (no ingredients )
How can I match two data sets to find out individual level ingredients consumed by each person.
Below example data sets are given. I also do not know why example data sets are not working (very sorry about that)
Household level data:
clear
input double hh_id int Menu_1 int ingre_1 int ingre_2 int ingre_3 int ingre_4 int ingre_5
1 "Salt"
1 "Rice/Jao" "Fine Rice"
1 "Jhol curry" "Lau Shak" "Koi" "Potato" "Turmeric"
1 "Bhuna curry" "Potato" "Onion" "Garloic" "Coriander"
1 "Supari"
1 "Betel Leaf"
2 "Rice/Jao"
2 "Bhuna corry" "Water gourd" "Tengra" "Onion" "Green chilli"
2 "Salt"
end
Individual level data:
input double hh_id double Person_id double age int Menu_2
1 1 . "Salt"
1 1 57 "Rice/Jao"
1 1 . "Bhuna curry"
1 2 50 "Rice/Jao"
1 2 . "Bhuna curry"
1 2 . "Jhol curry"
2 1 . "Salt"
2 1 51 "Rice/Jao"
2 1 . "Bhuna curry"
end
Any support would highly appreciated !
Thank you so much!
Related Posts with Matching households food consumption with individual
Multilevel regresion code doubtHi all, I have date of 100 employees per company, for several companies. I would like to perform a …
Keep a group of observations if one record meets a certain conditionHi All, Here's an example of the sort of dataset that I'm working with: clear input studyid edvisi…
Tabout and Fre suddenly not working?For some reason when I export frequency tables to excel and/or word (as .csv or .rtf files), they ar…
Discrete choice experiment : WTP with effects codingHello, I'm afraid this is not strictly a stata question. I have conducted a Discrete choice experime…
Break in consecutive values to identify groupsSuppose I have a dataset like this: clear set obs 20 gen x = 1 gen id = 1 in 1/10 replace id = …
Subscribe to:
Post Comments (Atom)
0 Response to Matching households food consumption with individual
Post a Comment