The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » How to use All Women Factor in SPSS
How to use All Women Factor in SPSS [message #6725] Fri, 03 July 2015 01:00 Go to next message
fredhollows
Messages: 2
Registered: July 2015
Member
I am trying to analyse first births in Bangladesh 2011 DHS of ever married women
When I apply the All Women Factor in SPSS it increases both the numerator (eg total number of children ever born) as well as the denominator, giving incorrect percentages.
From other posts I see that I need to do numerator and denominator separately and some examples are given in STATA, but I do not know how to do this in SPPS ( I have never used complex sample function) . Can you advise how to do this?
As a first step I am trying to reproduce table 5.9 in the Bangladesh 2011 report Percentage of all women who gave birth by exact age, percentage who have never given birth, and median age at first birth (looking at 20-24).
Many thanks
Re: How to use All Women Factor in SPSS [message #7075 is a reply to message #6725] Wed, 19 August 2015 14:36 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 770
Registered: January 2013
Senior Member
As you realized you need to inflate the denominator, and then handle the numerator in a different way. For example if you want to calculate the proportion of all women who never gave birth, you need to inflate the denominator to all women, and then, using the assumption that women who were never married have never given birth, you subtract the number of women who ever gave birth from the total number of all women to get the number of all women who never gave birth. Dividing this number by the total number of all women gives you the proportion of all women who never gave birth. Below is example code in SPSS for this:
* Code for producing proportion of all women who never gave birth for Bangladesh 2011 DHS.
CD 'C:\Data\DHS_SPSS'.
GET  FILE='BDIR61FL.SAV'.

* Sample weight.
COMPUTE WGT=V005/1000000.
* All women factor.
COMPUTE AW=AWFACTT/100.
VARIABLE LABELS AW ' All women'.
* Combined weight for checking.
COMPUTE AW_WGT = AW*WGT.
WEIGHT BY AW_WGT.
* Tabulate frequency of age to check numbers of all women by age group.
FREQUENCIES V013.

WEIGHT BY WGT.
* Ever given birth.
COMPUTE GB=(V201>0).
VARIABLE LABELS GB 'Given birth'.

* Ever given birth and all women for total.
DATASET DECLARE AggrT.
AGGREGATE
  /OUTFILE='AggrT'
  /GB=SUM(GB) 
  /AW=SUM(AW).

* Ever given birth and all women by age group.
DATASET DECLARE Aggr.
AGGREGATE
  /OUTFILE='Aggr'
  /BREAK=V013
  /GB=SUM(GB) 
  /AW=SUM(AW).

* Proportion never given birth for total.
DATASET ACTIVATE AggrT.
COMPUTE NGB=AW - GB.
COMPUTE PROP_NGB=100*NGB/AW.
VARIABLE LABELS PROP_NGB 'Proportion never given birth of all women'.
VARIABLE LABELS AW 'Number of all women'.
EXECUTE.

MEANS PROP_NGB AW /CELLS=MEAN.

* Proportion never given birth for total.
DATASET ACTIVATE Aggr.
COMPUTE NGB=AW - GB.
COMPUTE PROP_NGB=100*NGB/AW.
VARIABLE LABELS PROP_NGB 'Proportion never given birth of all women'.
VARIABLE LABELS AW 'Number of all women'.
EXECUTE.

MEANS PROP_NGB AW BY V013 /CELLS=MEAN.

When you see the output for the last mean, ignore the Total row as this is just a mean of means and is not the correct total. The correct total is provided in the preceding Means table.

I hope this helps.

[Updated on: Wed, 19 August 2015 14:38]

Report message to a moderator

Re: How to use All Women Factor in SPSS [message #7078 is a reply to message #7075] Wed, 19 August 2015 21:38 Go to previous message
fredhollows
Messages: 2
Registered: July 2015
Member
Thanks, this is helpful
Previous Topic: Weighting after merge
Next Topic: Combining sampling strata categories
Goto Forum:
  


Current Time: Mon Jun 27 13:18:34 Coordinated Universal Time 2022