I trying to calculate an HDDS score which is basically a sum of food types that a household has consumed in the last 24hr. Each food type is coded 1 for Yes or 0 for No where calculating it by hand is just adding all the ones for each household; the max score number should be 12 for 12 food types. Using this principle I thought it was simply creating an HDDS variable and then replacing it with an addition of all the food types but it doesn't seem to be that simple.
This is what I did but it returns fewer observations than expected
gen HDDS =.
replace HDDS = FD_CEREAL+FD_SUGAR+FD_OIL+FD_PULSES+FD_FISH.......
Thanks for your help
Mona
Related Posts with Calcultating Household Diet score(HDDS)
Fixed effects with multiple region-level observationsHi, I am using survey level data for the US which is divided at the county level, and I have multip…
Statistical significance for sigma_u and rho from Stata’s xtprobit commandDear all, I'm estimating a dynamic random effects probit model assuming a first order Markov proces…
Time Series Statistical Analysis of Crime Rates Between 2018 and 2021Hello, I was wondering if you could assist me with a number of issues i am experiencing in relation…
Help on regexmI have a multiple response variable codes as 00 01 02 03 04 05 06 07 08 09 10 11 12 as string variab…
What is wrong with my merge? (data examples are provided)I am merging the following two datasets. But I got 0 matched ((_merge==3) is zero). The code I used …
Subscribe to:
Post Comments (Atom)
0 Response to Calcultating Household Diet score(HDDS)
Post a Comment