The DHS Program User Forum - RDF feed
https://userforum.dhsprogram.com/index.php
Using svy: tab
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=8401&th=4619#msg_8401
1. There are two ways of attaching weights to the variables and then tab:
gen wgt=v005/1000000
tab v025 [iweight=wgt]
This has worked and produced an output
type of |
place of |
residence | Freq. Percent Cum.
------------+-----------------------------------
urban | 1,717.2704 19.80 19.80
rural | 6,956.7296 80.20 100.00
------------+-----------------------------------
Total | 8,673.9999 100.00
Another method (recommended in DHS videos) is set for survey data and then tab
gen wgt=v005/1000000
svyset[pw=wgt], psu(v021) strata(v022) singleunit(centered)
svy:tab v025
this has not worked
pweight: wgt
VCE: linearized
Single unit: centered
Strata 1: v022
SU 1: v021
FPC 1: <zero>
. svy:tab v025
no observations
r(2000);
What could be the problem?
2. which variables are suitable to capture child health and which data file is suitable to use to get these variables?
Gabriel]]>lexgw2015-10-23T15:03:59-00:00Re: Using svy: tab
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=8420&th=4619#msg_8420
egen strata = group(v024 v025)
replace v022 = strata
replace v023 = strata
Then run the svyset and svy:tab commands to produce the results.
2) You should use the dataset that matches the unit of analysis that you wish to use. If you are looking at child health, I expect that you will want to analyze children under the age of 5, in which case you should work with the children's recode (KR) file.]]>Trevor-DHS2015-10-26T18:42:26-00:00Re: Using svy: tab
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=8432&th=4619#msg_8432
lexgw2015-10-27T16:18:30-00:00Re: Using svy: tab
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=8518&th=4619#msg_8518
In connection to the question I asked previously, I am able to replicate DHS 2011 statistics on child health for Uganda. But this is only when it is a one way tabulation (just one variable). When I make a two-way tabulation (with two variables) I do not replicate DHS statistics. I need help. For example, I generated an ARI variable when I tab it I get correct results but when I tab it with v024 (region), I do not get the figures in table 10.5 DHS report 2011 for Uganda page 129. This is what I get;
I generate ARI variable only for live children only (b5==1)
. gen ari=0 if b5==1
(1299 missing values generated)
. *ARI is defined as children with a cough with short rapid breaths (h31b==1) or/and congestion in the chest/blocked or runny nose
> (h31c==1 | h31c==3)*/
. replace ari=1 if b5==1 & h31b==1 & (h31c==1 | h31c==3)/*1 is for chest only 3 is for both chest & blocked nose*/
(2156 real changes made)
. svy: tab ari if survey==1
(running tabulate on estimation sample)
Number of strata = 19 Number of obs = 7355
Number of PSUs = 404 Population size = 7535.3926
Design df = 385
-----------------------
ari | proportions
----------+------------
0 | .8516
1 | .1484
|
Total | 1
-----------------------
Key: proportions = cell proportions
This seems fine because the report is talking about 15% of children with symptoms of ARI. but for the two I can replicate eg;
svy: tab v024 ari if survey==1
(running tabulate on estimation sample)
Number of strata = 19 Number of obs = 7355
Number of PSUs = 404 Population size = 7535.3926
Design df = 385
-------------------------------
| ari
region | 0 1 Total
----------+--------------------
kampala | .0533 .0086 .062
central | .0894 .0092 .0987
central | .0928 .0125 .1054
east cen | .096 .0171 .1131
eastern | .1419 .0284 .1704
north | .0691 .0196 .0887
karamoja | .0298 .0075 .0373
west-nil | .0509 .0083 .0592
western | .1211 .0244 .1454
southwes | .1072 .0127 .1199
|
Total | .8516 .1484 1
-------------------------------
Key: cell proportions
This is different from what is in table 10.5 page 129
svy: tab v106 ari if survey==1
(running tabulate on estimation sample)
Number of strata = 19 Number of obs = 7355
Number of PSUs = 404 Population size = 7535.3926
Design df = 385
-------------------------------
highest |
education | ari
al level | 0 1 Total
----------+--------------------
no educa | .1219 .0216 .1435
primary | .5357 .1002 .6359
secondar | .1627 .0222 .1849
higher | .0312 .0044 .0356
|
Total | .8516 .1484 1
-------------------------------
Key: cell proportions
Still different!! need help. thanks]]>lexgw2015-11-08T21:28:19-00:00Re: Using svy: tab
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=8705&th=4619#msg_8705
Trevor-DHS2015-12-03T17:55:20-00:00Re: Using svy: tab
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=8706&th=4619#msg_8706