[EpiData-list] How to analyse for outcomes at specific periods during follow ups

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Tue Nov 15 07:54:18 CST 2011


Do you have the variable ENTRYDATE on every record for a patient? Your challenge then is to find the visit closest to 6, 12, 18 months, etc.
The approach to this problem makes use of the notation var[recnumber-1] to access values of a variable from the previous record

// define a new var that will be 6-month times since enrolment (MON6) and then sort the data by id and visitdate

define mon6 ##
monfollow=integer(round((visitdate-entrydate)/182.5,0))
sort id visitdate

gen i keepvisit=0   // integer that will be 1 or 0; start with all zero
if (entrydate=visitdate) then keepvisit=1  // keep enrolment visit

// keep a record if ID is the same as previous and monfollow goes up
if (id = id[recnumber-1]) and (monfollow> monfollow[recnumber-1]) then keepvisit=1
select keepvisit=1

Now you just have the visits closest to 6 months, 12 months, etc

Jamie

On 2011-11-15, Walter wrote:

>  I have a relational (Epidata entry) data base which I have data for
> over one year follow up of patients. I would like to analyse in
> Epidata analysis and check the Blood pressure, blood sugar
> readings......at every six months follow up for each patient since
> they were enrolled.
> 
> How do I get to select six month, twelve month....visits for each
> patient form their date of enrollment. ( in my database I have var:
> entrydate at registration and visitdate on each visit)



More information about the EpiData-list mailing list