The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Nutrition and Anthropometry » Balancing number of observations for the dependent and independent variables
Balancing number of observations for the dependent and independent variables [message #26309] Mon, 06 March 2023 21:54 Go to next message
I am Faithful is currently offline  I am Faithful
Messages: 3
Registered: March 2023
Member
Hello


I am doing a research on maternal empowerment and the effect on underfive child nutrition in Malawi, I am using KR dataset.
With that in mind, I am trying to do some inferential and descriptive statistics to identify significant variables to use in the final model but for some variables, the number of observations do not balance.

For instance, when I do

​​​​​​​tab stunting educ, the n in educ is more or less than the n in stunting. Please assist how I can balance the two

[Updated on: Mon, 06 March 2023 21:55]

Report message to a moderator

Re: Balancing number of observations for the dependent and independent variables [message #26322 is a reply to message #26309] Tue, 07 March 2023 15:25 Go to previous messageGo to next message
Janet-DHS is currently offline  Janet-DHS
Messages: 624
Registered: April 2022
Senior Member
Could you provide the survey year you are referring to?
Re: Balancing number of observations for the dependent and independent variables [message #26329 is a reply to message #26322] Tue, 07 March 2023 19:39 Go to previous messageGo to next message
I am Faithful is currently offline  I am Faithful
Messages: 3
Registered: March 2023
Member
Thank you Janet.

I am using DHS Malawi 2015/16.

I have a number of independent variables are residence, maternal education, child age, child sex, sex of household head, maternal occupation, among others. I have also created a maternal autonomy and maternal knowledge acquisition index as as main independent variables of interest.

The dependent variables are stunting, wasting and underweight.

So I want the number of observations in these variables to balance.

Re: Balancing number of observations for the dependent and independent variables [message #26334 is a reply to message #26329] Wed, 08 March 2023 10:41 Go to previous messageGo to next message
I am Faithful is currently offline  I am Faithful
Messages: 3
Registered: March 2023
Member
Hi Janet

Let me clarify my point to say I meant the

summarize command shows different number of observations between for instance stunting and child gender, age of household head and not Tab command as earlier stated.

Again, is it ok to proceed with the analysis if summarize command shows different number of obs between the dependent and independent variables?
Re: Balancing number of observations for the dependent and independent variables [message #26339 is a reply to message #26329] Wed, 08 March 2023 16:47 Go to previous message
Janet-DHS is currently offline  Janet-DHS
Messages: 624
Registered: April 2022
Senior Member
Following is a response from DHS staff member, Tom Pullum:

I believe you are doing several different regressions, and are getting different sample sizes (n's). This can happen because the different variables may have different numbers of cases that are not applicable or are automatically excluded for different reasons. If you want all the models to have the same number of cases, then you have to define a variable "varsmissing" (for example) that is coded "1" if a case is dropped from ANY of the models and "0" otherwise. Then you re-run the models with a line "if varsmissing==0". There are alternative ways to do this, for example with "svy: subpop(X)". (If you do it with subpop, the variable X in parentheses should be 1 if you want to KEEP the case, the reverse of the coding I suggested for "varsmissing".)

There are advantages to having the same n for several models, for example if you want to test one model against another. But if you lose a lot of cases from just one or two of your variables, it may be preferable to drop the variable and keep the cases.
Previous Topic: Which file to choose -KR- BR -IR
Next Topic: Anemia
Goto Forum:
  


Current Time: Sun Mar 3 07:32:58 Coordinated Universal Time 2024