Home » Topics » Reproductive Health » Reproductive calendar
Re: Reproductive calendar [message #1390 is a reply to message #1388] |
Thu, 20 February 2014 15:09 |
|
user-rhs
Messages: 132 Registered: December 2013
|
Senior Member |
|
|
Kash,
From a USAID 2009 report: Levels, Trends, and Reasons for Contraceptive Discontinuation (http://pdf.usaid.gov/pdf_docs/PNADQ639.pdf)
Quote:The DHS has created a system for generating events-based datasets from the calendar data,
where each change in the calendar becomes one observation, or ―row,‖ in a dataset. Each event
in the calendar--an episode of contraceptive use, a pregnancy, a birth, a termination, or an
episode of contraceptive non-use--is converted from the calendar string (the VCAL variables in
individual recode or woman-based datasets) into a separate observation for analysis. The start
and end date of each event is also recoded, allowing us to calculate directly the duration of the
event, women's age, women's parity, and children ever born (using the birth history) at the start
or end of each event.
As an alternative, you may want to read documentation on the string or substr function in Stata. Someone may have already answered your question on Statalist http://www.stata.com/statalist/archive/
RHS
EDIT: I have attached a do-file that does what was mentioned in the report (takes the string and creates a new observation for each character). For this country, the length of the VCAL_1 variable was 65, so I generated 65 new vbls and reshaped from wide to long. From here, you can use -stset- or what have you to set the dataset as survival time data, panel, etc. I used Excel to help me repeat all of those command lines 65 times. I'm sure there's a more elegant way to do this, but this is one way you can get started
-
Attachment: vcal.do
(Size: 2.27KB, Downloaded 1143 times)
-
Attachment: vcal.xlsx
(Size: 10.67KB, Downloaded 1133 times)
[Updated on: Thu, 20 February 2014 18:10] Report message to a moderator
|
|
|
|
|
Reproductive calendar
By: kash on Wed, 18 December 2013 09:30
|
|
|
Re: Reproductive calendar
By: Liz-DHS on Thu, 20 February 2014 14:10
|
|
|
Re: Reproductive calendar
By: user-rhs on Thu, 20 February 2014 15:09
|
|
|
Re: Reproductive calendar
|
|
|
Re: Reproductive calendar
By: user-rhs on Fri, 21 February 2014 18:44
|
|
|
Re: Reproductive calendar
|
|
|
Re: Reproductive calendar
By: user-rhs on Mon, 24 February 2014 14:42
|
|
|
Re: Reproductive calendar
By: kash on Sat, 24 May 2014 17:06
|
|
|
Re: Reproductive calendar
|
|
|
Re: Reproductive calendar
|
|
|
Re: Reproductive calendar
By: kash on Mon, 26 May 2014 11:41
|
|
|
Re: Reproductive calendar
|
|
|
Re: Reproductive calendar
|
|
|
Re: Reproductive calendar
By: kash on Tue, 27 May 2014 14:09
|
|
|
Re: Reproductive calendar
By: Liz-DHS on Wed, 05 March 2014 11:33
|
|
|
Re: Reproductive calendar
By: user-rhs on Tue, 18 March 2014 20:20
|
|
|
Re: Reproductive calendar
By: Liz-DHS on Tue, 18 March 2014 22:25
|
|
|
Re: Reproductive calendar
By: Liz-DHS on Wed, 19 March 2014 14:18
|
|
|
Re: Reproductive calendar
By: user-rhs on Wed, 19 March 2014 16:33
|
|
|
Re: Reproductive calendar
By: Liz-DHS on Thu, 20 March 2014 09:38
|
|
|
Re: Reproductive calendar
By: kash on Sat, 24 May 2014 16:34
|
|
|
Re: Reproductive calendar
By: Kisaakye on Mon, 17 August 2015 06:32
|
|
|
Re: Reproductive calendar
|
|
|
Re: Reproductive calendar
By: Kisaakye on Tue, 18 August 2015 05:57
|
|
|
Re: Reproductive calendar
By: user-rhs on Tue, 18 August 2015 10:11
|
|
|
Re: Reproductive calendar
By: Kisaakye on Tue, 18 August 2015 10:17
|
|
|
Re: Reproductive calendar
By: user-rhs on Tue, 18 August 2015 10:33
|
|
|
Re: Reproductive calendar
By: Kisaakye on Tue, 18 August 2015 11:11
|
|
|
Re: Reproductive calendar
By: Liz-DHS on Tue, 18 August 2015 11:19
|
|
|
Re: Reproductive calendar
By: Kisaakye on Tue, 18 August 2015 11:24
|
|
|
Re: Reproductive calendar
By: Liz-DHS on Tue, 18 August 2015 11:36
|
|
|
Re: Reproductive calendar
|
|
|
Re: Reproductive calendar
By: Kisaakye on Wed, 26 August 2015 08:17
|
|
|
Re: Reproductive calendar
|
|
|
Re: Reproductive calendar
By: Kisaakye on Thu, 27 August 2015 09:48
|
Goto Forum:
Current Time: Sat Dec 28 17:44:27 Coordinated Universal Time 2024
|