The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Reproductive Health » Reproductive calendar
Re: Reproductive calendar [message #7048 is a reply to message #7047] Mon, 17 August 2015 10:59 Go to previous messageGo to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
The calendar (vcal_1) is set up as a string of 80 characters, with the 80th character representing the start point of the calendar, which, in the case of Uganda DHS 2011, is January 2006. V017 tells you the century month code for the start of the calendar (1273=January 2006). Position 1 in the calendar in this case would then be 79 months later, which would be August 2012, however, this is beyond the date of interview. Any months beyond the date of interview are left blank. If the interview, for example, took place in November 2011, then the information in the calendar would start in position 10, and positions 1-9 (corresponding to August 2012 back to December 2011) would all be blank. V018 tells you the position of the month of interview, and for an interview in November 2011 would be position 11.

You say that the first 11 positions have no record/event, but that is only the case for an interview taking place in September 2011. The Interviews took place between June 2011 and December 2011, so the number of blanks on the beginning of the record will differ, depending on the month of interview.

IMPORTANT NOTE: For some surveys, the calendar data are misaligned in the Stata data files. In those surveys affected, the calendar data are all trimmed so that they are left aligned. This only affects the Stata versions of the datasets, and does not affect all surveys (only a subset). I have written code to correct the misalignment, which I am attaching here. You will find a foreach statement in the code that lists the datasets affected (that I know of to date). There is a quick check to see if your dataset is affected:
gen v = substr(vcal_1,1,1)
tab v

If the calendar is correctly aligned, v will be mostly blank - in fact in the vast majority of surveys it will be all blank.
If v is not blank for most/all cases, then the calendar is misaligned. To correct the alignment, you can use the code attached.

I'm also attaching code I use for reshaping the calendar, which you can adapt for your own needs. Make sure you run the realign code first, though, before the reshape code, if the survey needs it [Uganda DHS 2011 is fine and does not need realigning - see the foreach for the datasets that I know do need realigning].


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Variable labels for reproductive calendar - Nigeria 2013
Next Topic: Knowledge of contraceptive methods - Senegal v304
Goto Forum:
  


Current Time: Sat Dec 28 17:45:35 Coordinated Universal Time 2024