"all graft fail, indeed same to graftfail"
"replace followtime_y2= timerrtlost if event_y==3;replace followtime_y2= timerrtdeath if event_y==4"
"gen followtime_y2= timerrtextract2; replace followtime_y2= timerrttx if event_y==1;replace followtime_y2= timerrtrec if event_y==2"
"0=alive; 1=tansplant(tx, no matter die or not); 2=recovery(timerectx ==.); 3=lost to follow-up(no tx, die nor rec in the individual patient); 4=death(Death after recovery is regarded as rec and after tx is regarded as tx)"
"sort id graftno_y; gen timelosttx2_cl3= timelosttx2_cl2; bys id: replace timelosttx2_cl3=timelosttx2_cl3[1]"
"gsort id -graftno;gen agerrt_2 = agerrt;by id: replace agerrt_2= agerrt_2[_N]"
"gsort id -graftno;gen yr_2 = yr;by id: replace yr_2 =  yr_2[_N]"
"gsort id -graftno;gen prd_2 = prd_new;by id: replace prd_2 =  prd_2[_N]"
"gsort id -graftno;gen causdeth_2 = causdeth;by id: replace causdeth_2= causdeth_2[_N]"
"gsort id -graftno;gen First_RRT_2 = First_RRT_2;by id: replace First_RRT_2 = First_RRT_2[_N]"
"sort id graftno; gen timelosttx_cl3= timelosttx_cl2; bys id: replace timelosttx_cl3=timelosttx_cl3[1]"
"survival time of patient from the initiation of RRT to the lost to follow-up"
"survival time of patient from the initiation of RRT to renal function recovery"
"survival time of patient from the renal function recovery to lost to followup"
reclassify race to five kinds
reclassify race to two kinds
"gen followtime_y= timerrtextract; replace followtime_y= timerrttx if event_y==1;replace followtime_y= timerrtrec if event_y==2"
"replace followtime_y= timerrtlost if event_y==3;replace followtime_y= timerrtdeath if event_y==4"
"0, alive tx cases; 1, recovery after tx; 2, lost after tx; 3, all the graft fail; 4, death after tx including those lost or graft fail and then died"
"0, alive tx cases; 1, recovery after tx; 2, lost after tx; 3, all the graft fail; 4, death after tx excluding those graft fail and then died"
" related with eventtx_y2; different from followyeartx_y2 only when the tx cases died. it regarded those graft failed and then died as failed(eventtx_y=4 and eventtx_y2=3)"
"from ischemia_y, 0,0-4h; 1,5-12h; 2,13-17h; 3,18-24h; 4,>24h"
"from maxcyto,0, 0; 1, 1; 2, 2-12; 3, 13-75; 4, >75"
"from currcyto,0, 0; 1, 1-30; 2, >30"
"plot after stcrreg without tvc adding more donor info"