The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Wealth Index » Error in SPSS code for Honduras 2011 - 2012 Wealth Index
Error in SPSS code for Honduras 2011 - 2012 Wealth Index [message #10206] Fri, 08 July 2016 11:42 Go to next message
jwilliamrozelle is currently offline  jwilliamrozelle
Messages: 18
Registered: July 2016
Member

I wanted to alert you to an error in the SPSS code for the Honduras 2011 12 that's published on the wealth index construction page.

The error is near lines 496 508, in the Drinking water supply section. From the DHS, the code is:

compute h2oires=0.
if (qh121=11) h2oires=1.
variable labels h2oires "Public Piped into dwelling".
compute h2oyrd=0.
if (qh121=12) h2oyrd=1.
variable labels h2oyrd "Public Piped into yard/plot".
compute h2opires=0.
if (qh121=11) h2opires=1.
variable labels h2opires "Private Piped into dwelling".
compute h2opyrd=0.
if (qh121=12) h2opyrd=1.
variable labels h2opyrd "Private Piped into yard/plot".

You'll notice that when QH121 = 11 and 12, it's transformed twice into different dummy variables. The code should instead be:

compute h2oires=0.
if (qh121=11) h2oires=1.
variable labels h2oires "Public Piped into dwelling".
compute h2oyrd=0.
if (qh121=12) h2oyrd=1.
variable labels h2oyrd "Public Piped into yard/plot".
compute h2opires=0.
if (qh121=13) h2opires=1.
variable labels h2opires "Private Piped into dwelling".
compute h2opyrd=0.
if (qh121=14) h2opyrd=1.
variable labels h2opyrd "Private Piped into yard/plot".

This corresponds with the DHS survey question where 'Private Piped into dwelling' is coded as 13 and 'Private piped into yard/plot' is coded as 14.

Additionally, this error seems to have been incorporated into the factor analysis itself. The mean, standard deviation and component score coefficient for h2oyrd is identical to those for h2opyrd in the provided excel sheet. The same applies to h2oires and h2opires. This, of course, affects the values for the entire model.


Jeffrey W. Rozelle
Re: Error in SPSS code for Honduras 2011 - 2012 Wealth Index [message #10207 is a reply to message #10206] Fri, 08 July 2016 13:10 Go to previous messageGo to next message
admin is currently offline  admin
Messages: 50
Registered: November 2012
Senior Member
Administrator
Dear Mr. Rozelle,
Thank you for bringing to our attention. We will take a closer look at this.


We now have repositories of code written in Stata and SPSS available on Github. Please reference these code repositories as a resource for code for matching or calculating DHS indicators. The code repositories can be found at:

https://github.com/DHSProgram/DHS-Indicators-Stata
https://github.com/DHSProgram/DHS-Indicators-SPSS

Re: Error in SPSS code for Honduras 2011 - 2012 Wealth Index [message #10211 is a reply to message #10207] Fri, 08 July 2016 16:16 Go to previous messageGo to next message
jwilliamrozelle is currently offline  jwilliamrozelle
Messages: 18
Registered: July 2016
Member

Thanks, I'd be interested to hear what happens with this.

Jeffrey W. Rozelle
Re: Error in SPSS code for Honduras 2011 - 2012 Wealth Index [message #10214 is a reply to message #10206] Sat, 09 July 2016 17:26 Go to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 787
Registered: January 2013
Senior Member
Thanks - this does look like an error in the code for the wealth index, but I suspect that this will actually have only a very small effect on the calculated wealth index, and very little practical effect for any analysis in terms of meaningful results. We will review this and let you know what the effect is.
Previous Topic: Equity index
Next Topic: Comparative wealth index for 26 surveys
Goto Forum:
  


Current Time: Tue Mar 19 04:48:09 Coordinated Universal Time 2024