The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » Weight in Indonesia DHS 2012 for un insurance coverage (None)
Weight in Indonesia DHS 2012 for un insurance coverage (None) [message #22068] Tue, 26 January 2021 15:44 Go to next message
henggar pramudityo is currently offline  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 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3035
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 #22100 is a reply to message #22077] Mon, 01 February 2021 04:49 Go to previous messageGo to next message
henggar pramudityo is currently offline  henggar pramudityo
Messages: 2
Registered: January 2021
Member
Thanks a lot, Bridgette and Tom, for your reply,

I never used CSpro before, and I will be helped if you can share the male insurance coverage result.
I don't have any hint to covert the logic from CSpro to SAS.


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 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3035
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".

Previous Topic: What are weights correcting for?
Next Topic: Strata and PSUs in Egypt KR 2014 for sampling weight
Goto Forum:
  


Current Time: Fri Apr 19 17:44:34 Coordinated Universal Time 2024