All women factor in stata [message #9178] |
Fri, 19 February 2016 06:59 |
charvey91
Messages: 10 Registered: February 2016
|
Member |
|
|
Hi,
I am trying to analyse first births among women aged 20-24, using surveys that use only ever-married women samples. However, I am a little confused as to how to go about using the all women factor. I've searched the forum to find an answer, and have come across a solution that is provided for SPSS, so I know that the denominator and the numerator have to be treated separately, but I'm not sure how to adjust for this using stata and in particular what happens when looking at only a sub-group (those aged 20-24). I am not using data for a specific country right now, but for the sake of working this out, let's say I am using Bangladesh 2011.
Any help would be appreciated. Many thanks.
|
|
|
Re: All women factor in stata [message #9207 is a reply to message #9178] |
Tue, 23 February 2016 15:11 |
Bridgette-DHS
Messages: 3203 Registered: February 2013
|
Senior Member |
|
|
Following is a response from Senior DHS Stata Specialist, Tom Pullum:
The all-women factors are a major headache. Fortunately only a few surveys are limited to ever-married women.
The weight for the numerators is not affected, but the weight for the denominators will be multiplied by awfactt/100. The "t" after "awfact" tells you that that weight is for the total. If you want weight separately by urban-rural place of residence, or region, or one or two other covariates, you look for another letter (instead of "t"). What kind of analysis of first births do you want to do?
I will insert below a trick to get the mean of v201 using awfactt with Poisson regression and an offset. It may help.
* Strategy to implement awfactt for a mean
* Illustrate with Egypt
* I want to get:
* the unweighted mean ceb for emw
* the weighted mean ceb for emw
* the weighted mean ceb for all women (using awfactt)
set more off
cd e:\DHS\DHS_data\IR_files
use EGIR61FL.DTA, clear
keep v005 awfactt v201
rename v201 ceb
* the unweighted mean ceb for emw
summarize ceb
* the weighted mean ceb for emw
summarize ceb [iweight=v005/1000000]
* brute force
gen numerator=ceb*(v005/1000000)
gen denominator1=v005/1000000
gen denominator2=(v005/1000000)*(awfactt/100)
save temp.dta, replace
collapse (sum) numerator denominator*
gen mean1=numerator/denominator1
gen mean2=numerator/denominator2
* mean1 and mean2 are the weighted mean ceb for emw and all women, respectively
list, table clean
use temp.dta, clear
* Now get these three means using poisson regression
* this will match with the unweighted mean ceb for emw
poisson ceb, irr
* this will match with the weighted mean ceb for emw
poisson ceb [pweight=v005], irr
* this will match with the weighted mean ceb for all women
gen off=log(awfactt/100)
poisson ceb [pweight=v005], offset(off) irr
|
|
|
|
|
|
|