The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Fertility » Contraceptive calendar in Nigeria 2013 dataset
Contraceptive calendar in Nigeria 2013 dataset [message #6788] Wed, 15 July 2015 16:34 Go to previous message
ccox is currently offline  ccox
Messages: 6
Registered: March 2013
Location: St. Paul, MN
Member
Dear DHS,

I am working with a few colleagues on an analysis that will utilize data from the contraceptive calendar in the Nigeria 2013 dataset. We are running into a few issues and hope to get some guidance.

1. In the recode manual, it states that the calendar data are stored as single variables of 80 characters. In the Nigeria 2013 dataset, it appears that there are only 67 characters. Is this correct?

2. Our next question refers to vcal_1. It is my understanding that the earliest positions in the string variable relate to the most recent times and the end of the string relates to further back in time. When we use the code below to destring the variable we find that the last positions for some respondents are blank. It is my understanding that the blank positions correspond to the months after the month of the interview, thus shouldn't the blanks appear in the first positions because they would be the most recent times?

3. Our next question refers to vcal_2. When we use the code below to destring vcal_2, we find that when a respondent provides a reason for contraceptive discontinuation it appears in the 1st position regardless of when the respondent actually discontinued the contraceptive method. I would expect that the reason for discontinuation would be entered in the position that corresponds to the date of discontinuation from vcal_1. Is our code below used to destring vcal_2 incorrect?

4. Our last question refers to vcal_3, which according to the recode manual is the column that records episodes of marriage. Does the Nigeria 2013 dataset include vcal_3? If so, is the variable called something else? We can't seem to find it in the dataset.


Code for questions 2 and 3:

format %67s vcal_1

gen cal1 = substr(vcal_1,1,1)
gen cal2 = substr(vcal_1,2,1)
gen cal3 = substr(vcal_1,3,1)
gen cal4 = substr(vcal_1,4,1)...
gen cal67 = substr(vcal_1,67,1)

format %67s vcal_2

gen discal1 = substr(vcal_2,1,1)
gen discal2 = substr(vcal_2,2,1)
gen discal3 = substr(vcal_2,3,1)
gen discal4 = substr(vcal_2,4,1)...
gen discal67 = substr(vcal_2,67,1)

reshape long cal discal, i(caseid) j(event_time)

Thank you very much for your assistance!

Sincerely,

Carie
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: calculating adjusted GFR and Maternal Mortality Rates
Next Topic: Age range for the GFR in STATcompiler
Goto Forum:
  


Current Time: Wed Dec 25 12:35:57 Coordinated Universal Time 2024