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
predictnl after reghdfeHello, I am using Stata 17 with predictnl version 1.8.2 and reghdfe version 6.12.2. I try to estim…
Heckman two-step can not cluster standard errorsDear Statalists, My dependent variable is y2_ft in the second stage of heckman selection model, f d…
Turning three variables into one based on year. Code included Code: * Example generated by -dataex-. For more info, type help dataex clear input double hhid int …
stset with condition | Issue with codeWhat is wrong with my stset? I am excluding duplicates with the dupdrops variable for outcome analys…
Generating an indicator variable to denote the highest value from a set of variables in an observationI am working with a dataset from a poll of registered voters. For each observation (one voter), resp…
Subscribe to:
Post Comments (Atom)
0 Response to Matching households food consumption with individual
Post a Comment