The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Bangladesh » Calculating the current use of contraceptive by age group
Calculating the current use of contraceptive by age group [message #1665] Tue, 25 March 2014 12:29 Go to next message
sha_016 is currently offline  sha_016
Messages: 4
Registered: March 2014
Location: Antwerp, Belgium
Member

Dear Concern
I am analyzing the DHS-2007 data set for Bangladesh to see the current use of contraceptive by age group. A table of this information is already in the BDHS-2007 report. I was trying to compare the results of the report with the results I come up from the data set.
I found dissimilarity between BDHS-2007 report with my results. I am not sure whether I made the correct commands or not?
Here are the commands I followed:
gen strataid = v022
gen psu = v021
gen weight = v005/1000000
svyset psu (pw=weight), strata (strataid)
gen agegr= v012
recode agegr (15/19=1) (20/24=2) (25/29=3) (30/34=4) (35/39=5) (40/44=6) (45/49=7)
svy linearized, subpop(if v213==0) : proportion v312, stdize(weight) stdweight(v005) over (agegr)
After running these commands I got a table and results of this table is not the same with the BDHS-2007 report.
Could you please tell me about my possible errors or the correct ways of doing this?
Looking forward to hearing from you,
Thank you,
Shahab
Re: Calculating the current use of contraceptive by age group [message #1666 is a reply to message #1665] Tue, 25 March 2014 12:46 Go to previous messageGo to next message
Liz-DHS
Messages: 1516
Registered: February 2013
Senior Member
Dear User,
Can you please provide the table number and the page number of the table you are looking at in the final report of the Bangladesh DHS 2007?
Thank you!
Re: Calculating the current use of contraceptive by age group [message #1667 is a reply to message #1666] Tue, 25 March 2014 13:30 Go to previous messageGo to next message
sha_016 is currently offline  sha_016
Messages: 4
Registered: March 2014
Location: Antwerp, Belgium
Member

Dear
Table number is 5.5 on the page 60 in the report of DHS-2007 Bangladesh.
Thank you,
Shahab
Re: Calculating the current use of contraceptive by age group [message #1668 is a reply to message #1667] Tue, 25 March 2014 15:49 Go to previous messageGo to next message
Liz-DHS
Messages: 1516
Registered: February 2013
Senior Member
Dear USer,
I am not a programmer, but here is some code in CSPRo that may help in figuring things out.

The row variables are:
V013w age, value labels 1 15-19 2 20-24 3 25-29 4 30-34 5 35-39 6 40-44 7 45-49 8 50-54
(the other row variables in the table definition are other background characteristics which do not display in this particular table)

The Column variables:
useany value label 1 any method
usemod value label 1 any modern method
modmet2 Modern method, value labels 3 Pill 4 IUD 5 Injectables 6 Implants 7 Male condom 1 Femlae sterilization 2 Male sterilization
8 Female condom 9 Diaphragm 10 Foam/Jelly 11 LAM 12 Emergency contraception
usetrad Value label 1 any traditional method
tradmet2 Traditional method, value labels 13 Periodic abstinence 14 Withdrawal 15 Other
nousing Value label 1 not currently using
totnum2 Value labels 0 Total 1 Number of women
************************************************************ ************************************************************ ***************
Table 5.5 Current use of contraception by age

title( "Table 5.5 Current use of contraception by age"," ",
"Percent distribution of currently married women age 15-49 by contraceptive",
"method currently used and age, Bangladesh 2007" )
stub( "Age" );


crosstab float(1) t505 v013w+v102w+v101w+v149w+v218w2+v190w+total
useany+usemod+modmet2+usetrad+tradmet2+nousing+totnum2
exclude(rowzero,colzero,percents,totals,specval)

{ Table 5.5 processing }
jtot = tblcol( t505 );
jmax = jtot - 2;
do j = 0 while j <= jmax by 1
t505[*,j] = t505[*,j] * 100 / t505[*,jtot];
enddo;
t505[*,jmax+1] = tblsum( column t505[*, 0:jmax] );
any = tblcol( t505, useany );
nouse = tblcol( t505, nousing );
mod = tblcol( t505, usemod );
trad = tblcol( t505, usetrad );
{ total using any method }
t505[*, any] = tblsum( column t505[*, mod+1:nouse-1] );
{ total using any modern method }
t505[*, mod] = tblsum( column t505[*, mod+1:trad-1] );
{ total using any traditional or other method }
t505[*,trad] = tblsum( column t505[*,trad+1:nouse-1] );

{ table 5.4, 5.5 }

modmet2 = notappl;
tradmet2 = notappl;
nousing = notappl;
meth = V312;
box meth => method;
0 => 0;
1-3 => meth+2; { 3-Pill, 4-IUD, 5-Injections }
4 => 9; { 9-Diaphragm }
5 => 7; { 7-Male condom }
6-7 => meth-5; { 1-Female ster, 2-Male ster }
8,9 => meth+5; { 13-Periodic abstinence, 14-Withdrawal }
10 => 15; { 15-Other }
11 => 6; { 6-Implants }
13 => 11; { 11-Lactational amenorrhea }
14 => 8; { 8-Female condom }
15 => 10; { 10-Foam/jelly/suppository }
16 => 12; { 12-Emergency contraception }
=> default;
endbox;
if V313 = 0 then { not using }
nousing = 1
elseif V313 = 3 then { using modern }
modmet2 = method;
elseif V313 = 1 | V313 = 2 then { using traditional & others }
tradmet2 = method;
endif;

if marrwom then

xtab( t504, rweight ); { smg: moving here june 7, as we only want to show CM women }

xtab( t505, rweight );

{ smg: this code/table added 8-19-08 }

if modmet2=7 then { using condom }
rowMDG5=1; xtab (tMDG5, rweight);
endif;

if !(method in 0,default,notappl) then { she's using a method }
rowMDG5=2; xtab (tMDG5, rweight);
endif;

endif;
Re: Calculating the current use of contraceptive by age group [message #1669 is a reply to message #1668] Wed, 26 March 2014 04:15 Go to previous message
sha_016 is currently offline  sha_016
Messages: 4
Registered: March 2014
Location: Antwerp, Belgium
Member

Dear Sir/Madam

I am using STATA for analysis. I am not aware of CSPRo.
Thank you for you feedback,
Regards,
Shahab
Previous Topic: Child Nutrition data set
Next Topic: looking for appropriate variable
Goto Forum:
  


Current Time: Thu Mar 28 11:18:08 Coordinated Universal Time 2024