[EpiData-list] Epidata analysis

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Mon Aug 27 07:23:24 CDT 2012


The approach to this would be:

- create the new variable that identifies period (I'm not sure why you use more than one) (PERIOD)
- create a new variable that equals the number of days between expected and actual visit (POFFSET)
- SORT the data on patient ID, PERIOD and POFFSET
- create a new variable to mark the first record you find for a given patient and period (MARK) 
You do the last two steps like this:

sort ID PERIOD POFFSET
gen MARK=1
if (ID = ID[-1]) and (PERIOD=PERIOD[-1]) then MARK = 0

MARK will set to zero for the second visit for any patient in a period (because ID and PERIOD will be the same as previous)

Jamie

On 2012-08-27, at 3:11 AM, epidata-list at lists.umanitoba.ca wrote:

> I have a “.rec”  Epidata  data set with patients with chronic diseases
> (Diabetes and Hypertension). I would like to undertake some analysis to
> determine what is happening on the patients at different periods of follow
> up. (Month 3, 6, 12........)
> 
> i.e. Glucose  levels, BP, BMI.......
> 
> 
> 
> Each period I select (M3, M6, M12...)  I give an allowance of + &- 10 days.
> (e.g. for M3=90 days from the day of enrollment,  I select between day 80
> and day 100). This is because patients did not always respect their
> appointment dates.
> 
> 
> 
> In the period selected (between day 80 -100) some patients for several
> reasons were seen more than once. I would like to select only one visit
> date in case of moth 3 follow up that is closest to the 90th day from date
> of enrollment .(e.g. a patient had a visit on the 80th day and 95th day, I
> want to select the 95th day visit which is closest to day 90).....
> 
> 
> 
> How do I do this with Epidata analysis?
> 
> 
> 
> NB: My variables are “enrolment date” and “visit date”
> 
> 
> 
> Kwal
> _______________________________________________
> EpiData-list mailing list
> EpiData-list at lists.umanitoba.ca
> http://lists.umanitoba.ca/mailman/listinfo/epidata-list
> 



More information about the EpiData-list mailing list