! OPV and intussusception: analysis 5 ! $units 218$ $data indiv,sex,start,end,age, opv1,opv2,opv3$ $din 'intus.dat'$ ! $sort z indiv 2$ $cal new=%if(z==indiv,0,1)$ ! $cal IND_=%cu(new)$ $cal AGE_=age$ $cal STA_=%if((start<=27),27,start)$ $cal END_=%if((end>365),365,end)$ ! $cal T1=57:T2=87:T3=117:T4=148:T5=179:T6=210:T7=241: T8=272:T9=303:T10=334:T11=365$ $cal V1=opv1+13: V2=opv1+27: V3=opv1+41: V4=opv2+13: V5=opv2+27: V6=opv2+41: V7=opv3+13: V8=opv3+27: V9=opv3+41$ ! ! Now do some recoding in case intervals overlap ! First check how much recoding is required $cal int12=opv2-opv1:int23=opv3-opv2$ $tab the int12 s:the int23 s$ ! ! This determines that the minimum separation between doses is 21 days ! hence the only recoding required is as follows $cal V3=%if(V4