The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » Appending files (Appending files for trend analysis)
Appending files [message #22383] Thu, 04 March 2021 17:09 Go to previous message
Ugonna is currently offline  Ugonna
Messages: 26
Registered: June 2020
Hello ,

Please I need help here,

I'm looking at trends using 2008, 2013, and 2018 NDHS, of which I have appended appended the files using directions gotten from this forum

For instance I applied these steps to the files before and after appending:

*In the 2008 survey
egen stratum_ID_2008=group(sstate v025)
gen tempvar=stratum_ID_2008

*In the 2008 survey
gen stratum_id_2013=v023
gen tempvar=stratum_id_2013
order tempvar, after(v025)

* In the 2018 survey
gen stratum_ID_2018=v023
gen tempvar=stratum_ID_2018

* append and construct "survey" using v007

* In the combined file
egen stratum_ID=group(tempvar survey)
drop tempvar

egen cluster_ID=group(v001 survey)

svyset cluster_ID [pweight=v005], strata(stratum_ID) singleunit(centered).

Please I need to understand if I handled 2013 file correctly, because I noticed it has 73 strata (Lagos state only has urban) unlike 2008 and 2018 with 74 strata.
I observed that when I run these commands on the appended file

tab v023 v024 if year==0
tab v023 v024 if year==1
tab v023 v024 if year==2
(0=2008, 1=2013, 2=2018) 2008 and 2018 comes out properly ordered while 2013 output places states in wrong geopolitical zones.

I don't know what I could be doing wrong.
Will appreciate some help here.

Thank you.
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Strata and PSUs in Egypt KR 2014 for sampling weight
Next Topic: Pooled country analysis weighting
Goto Forum:

Current Time: Tue May 21 18:00:05 Coordinated Universal Time 2024