[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Generating episodes with lag periods

From   "Williams, Rachael" <[email protected]>
To   <[email protected]>
Subject   st: Generating episodes with lag periods
Date   Mon, 22 Sep 2008 11:36:49 +0100

Dear all,

I have a dataset with multiple records per person recorded on different

I would like to generate episodes for each person.
By this I mean that, for each person, the start date of the first
episode will be defined as the date of the earliest record.
The next episode for a person will be taken as the first record
occurring after X days from the date of the previous episode.

At the moment I am doing this in a very long winded fashion!
If anybody has a neat bit of code that might do the job, I would very
much appreciate it.

If anything is not clear, apologies - please do ask.

This email and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this email is prohibited and may be unlawful. 

If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received.Incoming and outgoing email messages are routinely monitored for compliance with the Department of Healths policy on the use of electronic communications. 

For more information on the Department of Healths email policy, click

The original of this email was scanned for viruses by the Government Secure Intranet virus scanning service supplied by Cable&Wireless in partnership with MessageLabs. (CCTM Certificate Number 2007/11/0032.) On leaving the GSi this email was certified virus free.
Communications via the GSi may be automatically logged, monitored and/or recorded for legal purposes.

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index