EC_DHSwts: Generate Vector of Weighted Number of Household Members

View source: R/EC_DHSwts.R

EC_DHSwtsR Documentation

Generate Vector of Weighted Number of Household Members

Description

In order to use a nationally-representative population for cluster analysis, 'EconomicClusters' uses weighted k-medoids clustering from the package 'WeightedCluster'. If employed for analysis of Demographic and Health Surveys (DHS) data, we recommend using the weights used by the DHS to calculate the wealth index (Rutstein, n.d.). 'EC_DHSwts' generates a vector of weighted number of household members using methods described in the DHS protocol (Rutstein, n.d.).

Usage

EC_DHSwts(X, dejure, defacto, HHwt)

Arguments

X

a data frame of all asset variables to be considered for variable selection coded as factors with column names specified

dejure

the variable specified by the DHS to describe number of dejure household members (see the DHS recode manual for your country for details)

defacto

the variable specified by the DHS to describe number of defacto household members (see the DHS recode manual for your country for details)

HHwt

DHS household weight variable (see the DHS recode manual for your country for details)

Details

As per DHS protocols for generation of the wealth index (Rutstein, n.d.), 'EC_DHSwts' multiplies the household sampling weight by the number of dejure household members (or the number of defacto household members if number of dejure members = 0) and divides the result by 1,000,000.

Value

A data frame with Column 1 containing weighted number of household members and Columns 2 through n containing all asset variables to be considered for variable selection

Note

'EconomicClusters' can be used with other nationally representative household-level surveys that ask about assets. Weights appropriate to the given survey should be applied.

Author(s)

Lauren Eyler economic.clusters@gmail.com

References

Rutstein SO. (n.d.). Steps to Constructing the New DHS Wealth Index. ICF International: Rockville, Maryland, <http://dhsprogram.com/programming/wealth%20index/Steps_to_constructing_the_new_DHS_Wealth_Index.pdf>

See Also

EC_vars, EC_time, EconomicClusters, HH_survey, assets

Examples

#In our sample data set, relevant variables are coded as follows:
#HH_survey$HHwt = household sampling weight
#HH_survey$dejure = number of dejure household members
#HH_survey$defacto = number of defacto household members
#Let's assume that we have already made a data frame containing only 
#the asset variables we will consider for variable selection, called 'assets'.
#Now, let's create a data frame containing DHS weights as the first column 
#and all asset variables to be considered for selection as the subsequent columns.

data(HH_survey)
data(assets)
data_for_EC<-EC_DHSwts(assets, HH_survey$dejure, HH_survey$defacto, HH_survey$HHwt)

#data_for_EC is now a data frame in the format needed to run 'EC_time' or 'EconomicClusters'


Lauren-Eyler/EconomicClusters documentation built on March 22, 2022, 1:21 a.m.