Home » Data » Weighting data » Weighing SPA data Tanzania
Weighing SPA data Tanzania [message #11825] |
Tue, 14 February 2017 16:07 |
Nadia
Messages: 6 Registered: February 2017
|
Member |
|
|
Hello,
I am working on the SPA data, specifically on TSPA.
I would like to assess the access to electricity by the health facilities in Tanzania (all facilities and by type of facilities).
I used stata to exctract the data. However, I cannot retrieve the percentages given in the report.
E.g: for the hospitals the report reports 91% but using stata and extracting the data for access to electricity for hospitals,
Tab factype if q341==1, I find something 32.6% for the different type of hospitals.
I am interested in the weighted variables( for the whole country). I tried different combinations without any success.
Could you please help me on that? I would like to understand how you obtained the percentages of electricity access by factype in the report.
Thanks a lot,
BR,
Nadia
|
|
|
Re: Weighing SPA data Tanzania [message #11828 is a reply to message #11825] |
Wed, 15 February 2017 10:25 |
Bridgette-DHS
Messages: 3208 Registered: February 2013
|
Senior Member |
|
|
Following is a response from DHS Senior Data Specialist, Claudia Marchena:
To get the results published in the report, you need to take the footnotes on the published table 3.3 into consideration.
Footnote:
1 Facility is connected to a central power grid and there has not been an interruption in power supply lasting for more than two hours at a time during normal working hours in the seven days before the survey, or facility has a functioning generator with fuel available on the day of the survey, or else facility has back-up solar power.
As explained in the footnote, the column on "Regular electricity" in table 3.3, uses the following logic to get the results published:
Logic:
(Q340=1 & Q341=1) or (poschar("AB",Q343) and Q345=1 and Q346=1) or pos("C",Q343)
Further explanations for logic:
Poschar("AB",Q343) is Q343 = A or Q343 = B
pos("C",Q343) is Q343 = C
The parenthesis are essential to delimit the conditions.
Regarding the weights and how to use them, they are explained in the survey documentation, TZSP71.doc. But basically each level of analysis has its own weights, Facility in variable FACWT, Provider in variable PROVWT, and client in variable CLIENTWT.
|
|
|
|
|
Re: Weighing SPA data Tanzania [message #11846 is a reply to message #11828] |
Fri, 17 February 2017 10:41 |
Nadia
Messages: 6 Registered: February 2017
|
Member |
|
|
Bridgette-DHS wrote on Wed, 15 February 2017 10:25Following is a response from DHS Senior Data Specialist, Claudia Marchena:
To get the results published in the report, you need to take the footnotes on the published table 3.3 into consideration.
Footnote:
1 Facility is connected to a central power grid and there has not been an interruption in power supply lasting for more than two hours at a time during normal working hours in the seven days before the survey, or facility has a functioning generator with fuel available on the day of the survey, or else facility has back-up solar power.
As explained in the footnote, the column on "Regular electricity" in table 3.3, uses the following logic to get the results published:
Logic:
(Q340=1 & Q341=1) or (poschar("AB",Q343) and Q345=1 and Q346=1) or pos("C",Q343)
Further explanations for logic:
Poschar("AB",Q343) is Q343 = A or Q343 = B
pos("C",Q343) is Q343 = C
The parenthesis are essential to delimit the conditions.
Regarding the weights and how to use them, they are explained in the survey documentation, TZSP71.doc. But basically each level of analysis has its own weights, Facility in variable FACWT, Provider in variable PROVWT, and client in variable CLIENTWT.
I finally found the facwt variable in the TZFC71FLSP 2014-2015. However, I still do not know if I need to weight the results of the table 3.3 or they already are the weighted values since the number of facilities corresponding to the different results reported are in fact the weighted number of facilities.
Regarding the replication of the results of the above mentioned table 3.3 and the code you provided,
tab factype if (q340==1 & q341==1) | (( q343=="A" | q343=="B") & q345==1 & q346==1) | (q343=="C"),[/b]
we get to far lower percentages than what reported in table 3.3
Thanks again for your help.
BR,
Nadia
|
|
|
|
Re: Weighting SPA data Tanzania [message #11852 is a reply to message #11851] |
Mon, 20 February 2017 13:47 |
Nadia
Messages: 6 Registered: February 2017
|
Member |
|
|
Bridgette-DHS wrote on Mon, 20 February 2017 13:20Following is another response from DHS Senior Data Specialist, Claudia Marchena:
Weighted and unweighted number of facilities (total facilities) are expected to be the same, because normalization process is done in order to do weights. You need to weight the data using the variable I sent in the previous response, and please reference the explanations on how to use weights that are in the documentation (also mentioned).
If you still have problems, please share the logic you are using, to help us find the mistake.
Thank you for your email. We cannot replicate the results of the table 3.3 based on the previously shared logic:
tab factype if (q340==1 & q341==1) | ((q343=="A" | q343=="B") & q345==1 & q346==1) | (q343=="C")
generate wgt = facwt/1000000
tab factype [iweight=wgt]
We found for the first two type of facilites (hospitals and health centers) lower percentages than those in the table (and higher % for the others).
Thanks for your help.
Nadia.
[Updated on: Tue, 21 February 2017 02:46] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Wed Dec 11 22:38:30 Coordinated Universal Time 2024
|