The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » Appending files (Appending files for trend analysis)
Re: Appending files [message #22402 is a reply to message #22397] Sun, 07 March 2021 16:28 Go to previous messageGo to previous message
Ugonna is currently offline  Ugonna
Messages: 26
Registered: June 2020
Member
Thank you for your response.

Please what does the following weighting commands on an appended file of 3 datasets do, and is it necessary?

summarize wt
scalar N=r(N)
scalar Nshare=N/3
generate wt_new=wt

summarize wt if year==0
scalar sumwt_new =r(sum)
replace wt_new =wt *Nshare/sumwt_new if year==0


summarize wt if year==1
scalar sumwt_new =r(sum)
replace wt_new =wt *Nshare/sumwt_new if year==1


summarize wt if year==2
scalar sumwt_new =r(sum)
replace wt_new =wt *Nshare/sumwt_new if year==2

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: Sun Nov 27 07:04:26 Coordinated Universal Time 2022