Weight in Indonesia DHS 2012 for un insurance coverage (None) [message #22068] |
Tue, 26 January 2021 15:44 |
henggar pramudityo
Messages: 2 Registered: January 2021
|
Member |
|
|
Dear DHS Team,
I have a study to find uncoverage insurance (none) in Jakarta in 2012.
Before implementing the program for Jakarta, I have to check my SAS program to reperform calculation with the national data same with DHS 2012 result report.
I have reperformed in SAS, there is no problem for females data, but my result in males data really different from DHS 2012 report.
My SAS program
Data idmr63fl;
set user.idmr63fl;
/*Create the weight variable*/
WGT=MV005/1000000;
run;
proc sort data=idmr63fl;
by MV013;
run ;
/*weighted frequency*/
proc freq data=idmr63fl;
table mv481;
weight WGT;
by MV013;
run;
Could you explain why this happens and what should I do?
Thank you.
|
|
|
Re: Weight in Indonesia DHS 2012 for un insurance coverage (None) [message #22077 is a reply to message #22068] |
Thu, 28 January 2021 18:02 |
Bridgette-DHS
Messages: 3167 Registered: February 2013
|
Senior Member |
|
|
Following is a response from DHS Research & Data Analysis Director, Tom Pullum:
Tables 3.8.1 and 3.8.2 in the Indonesia 2012 report were prepared in CSPro. The code is included in the attached text file. The table numbers may be different. I hope you can figure out the logic and convert to SAS. Note that it is possible to have more than one type of insurance. The table columns are sequenced with v481c, v481b, v481d, v481x. Note also that "None" includes cases with v481 coded "0" or coded ".". (Considering those two codes to be equivalent is unusual.) The variable prefix is v for women and mv for men.
Let us know if you still have difficulty matching the tables.
[Updated on: Fri, 29 January 2021 07:34] Report message to a moderator
|
|
|
|
Re: Weight in Indonesia DHS 2012 for un insurance coverage (None) [message #22315 is a reply to message #22100] |
Thu, 25 February 2021 14:27 |
Bridgette-DHS
Messages: 3167 Registered: February 2013
|
Senior Member |
|
|
Following is a response from Senior DHS Specialists, Trevor Croft and Tom Pullum:
Sorry for the delay. Note that the mean of a 0/1 variable is the proportion of cases with code 1. If you use 100 in place of 1, you get the percentage of cases with 1 (or 100). You can match the table with the following Stata code:
gen SS=0
gen Employer=0
gen Private=0
gen Other=0
gen None=0
replace SS=100 if v481c==1
replace Employer=100 if v481b==1
replace Private=100 if v481d==1
replace Other=100 if v481x==1
replace None=100 if v481c~=1 & v481b~=1 & v481d~=1 & v481x~=1
foreach var in SS Employer Private Other None {
mean `var' [iw=v005/1000000]
mean `var' [iw=v005/1000000], over(v013)
}
You can also get a match with the following command, and better-looking output:
tabstat SS Employer Private Other None [aw=v005/1000000], statistics(mean) by(v013) format(%6.1f)
The "foreach" loop includes "mean" and "iweight". The "tabstat" command includes "statistics(mean)" and "aweight". In general we avoid aweights, and we can't really say why the tabstat command only gives a match with aweights. For that reason, we would recommend that you use "mean" rather than "tabstat".
|
|
|