Dear all,
I am running a logistics regression to for example investigate whether the gender of the children living in the same household is associated with their nutritional divergent.
I use the command below;
logistic divergent_nut_outcome i.gender
[CODE]
* Example generated by -dataex-. For more info, type help dataex
clear
input str3 uid byte age_months long(gender nutritional_status) float divergent_nut_outcome
"119" 52 2 1 1
"119" 21 1 2 1
"119" 5 1 1 1
"131" 40 1 1 1
"131" 5 2 2 1
"311" 54 2 1 1
"311" 11 2 2 1
"419" 39 1 1 0
"419" 59 2 1 0
"419" 19 1 1 0
"525" 33 2 2 1
"525" 21 2 1 1
"526" 57 1 1 0
"526" 8 1 1 0
"633" 39 1 1 0
"633" 34 1 1 0
"7 2" 27 2 2 0
"7 2" 7 2 2 0
end
label values gender gender
label def gender 1 "female", modify
label def gender 2 "male", modify
label values nutritional_status nutritional_status
label def nutritional_status 1 "Normal", modify
label def nutritional_status 2 "Undernutrition", modify
Am I correct?
Alternatively, I also taught of collapsing the divergent_nut_outcome by household' before I run the logistic regression,
However, if I do so, I will face with potential bias when collapsing the data to a single observation per household and the risk of losing individual-level information like sex, age.
What is the best way to go?
Thank you.
I do appreciate your time and support.
I am running a logistics regression to for example investigate whether the gender of the children living in the same household is associated with their nutritional divergent.
I use the command below;
logistic divergent_nut_outcome i.gender
[CODE]
* Example generated by -dataex-. For more info, type help dataex
clear
input str3 uid byte age_months long(gender nutritional_status) float divergent_nut_outcome
"119" 52 2 1 1
"119" 21 1 2 1
"119" 5 1 1 1
"131" 40 1 1 1
"131" 5 2 2 1
"311" 54 2 1 1
"311" 11 2 2 1
"419" 39 1 1 0
"419" 59 2 1 0
"419" 19 1 1 0
"525" 33 2 2 1
"525" 21 2 1 1
"526" 57 1 1 0
"526" 8 1 1 0
"633" 39 1 1 0
"633" 34 1 1 0
"7 2" 27 2 2 0
"7 2" 7 2 2 0
end
label values gender gender
label def gender 1 "female", modify
label def gender 2 "male", modify
label values nutritional_status nutritional_status
label def nutritional_status 1 "Normal", modify
label def nutritional_status 2 "Undernutrition", modify
Am I correct?
Alternatively, I also taught of collapsing the divergent_nut_outcome by household' before I run the logistic regression,
However, if I do so, I will face with potential bias when collapsing the data to a single observation per household and the risk of losing individual-level information like sex, age.
What is the best way to go?
Thank you.
I do appreciate your time and support.