[EpiData-list] Epidata analysis

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Mon Aug 27 17:23:28 CDT 2012


Right - you could also define POFFSET as

gen i POFFSET = abs(.....)

or 

if POFFSET<0 then POFFSET= -1*POFFSET    // no need for [_n]

Jamie

On 2012-08-27, at 5:47 PM, epidata-list at lists.umanitoba.ca wrote:

>> 
>> 
>>> sort ID PERIOD POFFSET
>> gen MARK=1
>> if (ID = ID[-1]) and (PERIOD=PERIOD[-1]) then MARK = 0
> 
> This is a great approach. I just want to add something. According to my
> understanding, this would make MARK=1 for the records with the smallest
> number of one set of ID and PERIOD. But it does not necessarily mean that
> the record with MARK=1 would be closest the expected date.



More information about the EpiData-list mailing list