The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » Descriptives and chisq
Descriptives and chisq [message #8881] Mon, 11 January 2016 09:53 Go to next message
cbdolan is currently offline  cbdolan
Messages: 17
Registered: March 2013
Location: Williamsburg, VA
Member
For this analysis, I'm using the 2007 and 2013/14 DRC.

In order to provide unbiased estimates, sampling weights based on the probabilities of selection from the underlying population and non-responses were taken into account using the following code and then applying it through the svy: command

gen wgt=v005/1000000
egen stratum=group (v024 v025)
svyset [pw=wgt], psu(v021) strata(stratum)

Now I am creating my descriptive table. The DHS weighting videos recommend this syntax:

tab female treat [iweight=wgt]

However, this doesn't allow for a chisq option. Is the following syntax a correct alternative? This gives me proportions as well as the associated chisq:

svy: tab female treat

Thanks.

Carrie
Re: Descriptives and chisq [message #8883 is a reply to message #8881] Mon, 11 January 2016 13:31 Go to previous message
Reduced-For(u)m
Messages: 292
Registered: March 2013
Senior Member

Yes, you can use the "svy" prefix instead of "manually" weighting to tabulation. The "svy" gets you the weighting and also inference (p-values/standard errors/confidence intervals) adjustments for stratification and clustered sampling.

Previous Topic: Weighting district-level data
Next Topic: Weighting Data Question
Goto Forum:
  


Current Time: Thu Jun 30 22:06:03 Coordinated Universal Time 2022