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
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 previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
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

 
Read Message
Read Message
Read Message
Previous Topic: Weighting after merge
Next Topic: Combining sampling strata categories
Goto Forum:
  


Current Time: Wed Dec 25 23:54:42 Coordinated Universal Time 2024