Regards,

Kibria ]]>

Two problems. First, you are not using weights. Virtually every number in DHS tables is weighted. Second, you are not using marital status. The table is restricted to currently married women. It is important to read the table titles carefully. If you run this line, "tab v501 v025 [iweight=v005/1000000]" in that file, the top line (rounded to the nearest integers) will give 4709 and 12149.]]>

Now I know maybe I don't use weights to analysis,but I don't know what the weight is and how to use it.could you explain it for me?

Thank you very much for your time.

Best regards,

Soleilvon

]]>

The difference between the 6167 and the 5047 is completely due to the use of weights. Below I will paste the results in Stata, first without weights and second with weights, using BDIR70FL.dta. I do this with iweight but you can also do it with pweight, svyset, and svy.

To produce the weighted table in R, you would need to use the survey package. The following lines should help you get started.

library(survey) # install and load the survey package options(survey.lonely.psu="adjust") # to fix the issue with strata with single PSU # adjust will center the stratum at the population mean data$wt = data$v005/1000000 # create the weight variable mydesign<-svydesign(id=data$v021, data=data, strata=data$v023, weight=data$wt, nest=T) # set the survey design using the uploaded data (named data), the cluster (v021), the strata (v023) , and the weight (wt). # then use svymean or svytable to get the weighted proportions and frequencies of your variables. See the survey package documentation for further details.

]]>