Home » Countries » Other countries » Issues with Honduran DHS dataset 2011-12 (Adjusting for survey design in R)
Issues with Honduran DHS dataset 2011-12 [message #18789] |
Thu, 20 February 2020 22:03 ![Go to next message Go to previous message](/theme/default/images/down.png) |
Mariela Contreras
Messages: 7 Registered: September 2019
|
Member |
|
|
Dear all,
We are having issues using the 2011-12 Honduran dataset.
When you see the flowchart (attached in file), one can see that n is 5,487 which means that the observations in the database are 5,627 minus the 140 women that have children with missing nutritional status values.
Using the command tab1 which is part of the epicalc package in R, one can see that the number of women living in the rural and urban areas is 3878 and 1749, respectively (attached in file). These numbers add up to 5,627 women which is n before excluding women who have children with missing nutritional status values. Using this command we have not adjusted for survey design.
When we generated a 2x2 table (using the variables place of residence (urban and rural) and child stunting category) with the survey package in R and adjusting for survey design, one can notice that n is 4,248 mothers with children and not 5,487 mothers with children as we have defined in our flow chart (attached in file).
We also noticed that when we use the svyby commands to generate prevalence, the results are difficult to interpret, as they are not prevalences but look more like integers (e.g. 1 and 2 for place of residence.
Please note the several commands we used to generate the above results:
1) To adjust for survey design:
dhsdesign <- svydesign(id= violnutr_3R$prisam, strata = violnutr_3R$stratasam, weights= violnutr_3R$samweight/1000000, data= violnutr_3R)
-prisam is v021
-Stratasam is v022
-Samweight is d005 (weight for domestic violence module)
2) To generate a frequency of the variable place of residence
tab1(violnutr_3R$plares)
-violnutr_3R is the name of the dataset
-plares is the variable name for the places of residence (urban/rural)
3) To generate a 2x2 table (place of residence and child stunting category)
svyby(~chstunting_cat,~plares,dhsdesign, svymean, na.rm=TRUE)
We would appreciate your support in sorting out our issue.
Best regards,
Mariela
|
|
|
Goto Forum:
Current Time: Fri Feb 7 08:25:05 Coordinated Universal Time 2025
|