Home » Data » Dataset use in SPSS » mean and median duration of breastfeeding
mean and median duration of breastfeeding [message #378] 
Thu, 02 May 2013 09:56 

Further, I am writing to request for help to estimate mean and median duration of breastfeeding, postpartum amenorrhoea and insusceptibility, preferably using the lifetable. I would like to examine the patterns by age groups and relate them to contraception adoption. Postpartum variables are not borken down by age and are not readily available in DHS reports, I would appreciate if you could suggest the Stata/spss lifetable commands for computation of the variable or something similar. I have tried to estimate using the Prevalence /Incidence method in SPSS but I am getting estimates which are higher than DHS estimates and some of them implausible for the age group 1519.





Re: mean and median duration of breastfeeding [message #641 is a reply to message #631] 
Fri, 19 July 2013 10:41 
Sarah B
Messages: 23 Registered: June 2013

Member 


Hi Freddy,
Here's some code I wrote to match the table 6.8 in the Ethiopia 2005 data, which is the table on postpartum amenorrhea, insusceptibility and postpartum sexual abstinence. Please note that this table (and code) uses current status data, rather than recall of durations, which Shea mentions in his response.
** Use the KR data file, which contains all births in the 5 years prior to the survey
use "C:\DATA\ETKR51FL.DTA", clear
** Calculate age of the child in months
g agem=v008b3
** generate sampling weight
g wgt = v005/1000000
**The denominator for the table = women with children <36m old.
**select only 2nd birth for multiple births  assigned midx=1
ta b0 if agem<36 & (b0==0  b0==2) [iw=wgt]
**note that this matches the total denominator.
**amenorrheic
g amen=0 if agem<36 & (b0==0  b0==2)
*if currently pregnant, make not amenorrheic. Select for numerator only information from most recent birth (m6).
recode amen 0=1 if m6==96 & v213!=1 & midx==1
ta amen [iw=wgt]
**abstaining  same denominator and selections as for amenorrheic
g abst=0 if agem<36 & (b0==0  b0==2)
recode abst 0=1 if m8==96 & v213!=1 & midx==1
ta abst [iw=wgt]
**insuceptible = amenorrheic or abstaining
g insuc = 0 if agem<36 & (b0==0  b0==2)
recode insuc 0=1 if abst==1  amen==1
ta insuc [iw=wgt]
**All match ET table 6.8
I hope this helps with your first question.
Cheers,
Sarah






Re: mean and median duration of breastfeeding [message #16015 is a reply to message #8356] 
Mon, 22 October 2018 04:34 
enansubuga
Messages: 3 Registered: January 2017 Location: Uganda

Member 


Hello,
Kindly asking for the stata code for deriving the mean, median as shown in Table 5.6 for the Uganda 2016 udhs. I have used the code above and the figures match though less by a few decimal points. However, the code stops on deriving the totals and not the mean and median.
Any assistance is highly rendered.



Goto Forum:
Current Time: Fri Jun 21 16:40:50 Coordinated Universal Time 2024
