# SELECT LINES WITH EVENTS > 2015
dgn_complete.2015 <- dgn_complete %>%
select(evdate, inclusion, num_enq, RREC_COD_ANO, DGN_PAL) %>%
filter(evdate > inclusion)
count(dgn_complete) # 18543
count(dgn_complete.2015) # 12678
# SORTING
dgn_one <- dgn_complete.2015 %>%
group_by(num_enq, lubridate::date(evdate)) %>%
arrange(evdate) %>%
slice(1) %>%
ungroup() %>%
select(evdate, num_enq, DGN_PAL, DDIRT)
count(dgn_one) # 12678
# SQL COUNTING
library("sqldf")
dgn_oneclassifier <- sqldf("SELECT a.*, COUNT(*) count
FROM dgn_one a, dgn_one b
WHERE a.num_enq = b.num_enq AND b.ROWID <= a.ROWID
GROUP BY a.ROWID"
)
# NEW DATABASE WITH ONLY THE FIRST EVENT PER PERSON
dgn_line = filter(dgn_oneclassifier, count == 1)
count(dgn_line) # 7979
no-event event
2255 305
When transplantation is taken into account, the number of total events drops to 255. Fifty events occur after the transplantation and are not accounted as events anymore in the final analysis.
Il y a la question de Clémence à laquelle je n’ai pas encore repondu dans cette analyse. En effet, les sujets ayant reçu une transplantation ne sont plus suivi dans le registre REIN et leur date de décès pourrait ne pas être disponible - alors qu’ils sont bien decedés.
no event event
event 0 255
no event 2255 50
Columns refer to the variable apkd$event which does not include the information about transplantation. Rows refer to the variable includinding the information about transplantation timing.
G45 I60 I61 I62 I63 I64 I74 R471
18 5 18 12 30 1 219 2
G45 I60 I61 I62 I63
0.059016393 0.016393443 0.059016393 0.039344262 0.098360656
I64 I74 R471
0.003278689 0.718032787 0.006557377
FUP.19 = as.Date(adpkd$december, "%d/%m/%Y") - as.Date(adpkd$DDIRT, "%d/%m/%Y")
The variable adpkd$december replaces the previous date des dernières nouvelles variable.
# DEATH
FUP.D = as.Date(adpkd$DDC, "%d/%m/%Y") - as.Date(adpkd$DDIRT, "%d/%m/%Y")
# EVENT
FUP.E = as.Date(adpkd$evdate, "%d/%m/%Y") - as.Date(adpkd$DDIRT, "%d/%m/%Y")
FUP.T = as.Date(adpkd$DGRF, "%d/%m/%Y") - as.Date(adpkd$DDIRT, "%d/%m/%Y")
case_whennested in mutate 2adpkd <- adpkd %>%
mutate(epilogus = case_when(
# the patient is dead
DEATH == "1" & e.b.d == "0" ~ FUP.D,
# the patient is transplanted before the event
t.b.e == "1" ~ FUP.T,
# the patient is transplanted after the event
t.b.e == "0" ~ FUP.E,
# event
EVENT == "1" & e.b.i != "1" ~ FUP.E,
# no event
EVENT == "0" ~ FUP.19
))
Acronyms t.b.e and e.b.d stand for transplantation before the event and event before death respectively. The latter is to be considered only as an additional check on the database coherence:
# TRANSPLANTATION HAPPENS BEFORE THE EVENT
0 (after transplantation) 1 (before transplantation)
45 50
# EVENT HAPPENS BEFORE DEATH
0 (event after death) 1 (event before death)
20 26
coxph
coef exp(coef) se(coef) z p
URGn -0.157209 0.854525 0.276306 -0.569 0.56938
KTTINIn -0.029415 0.971013 0.211573 -0.139 0.88943
EPOINIn -0.380860 0.683274 0.173490 -2.195 0.02814
IRCn -1.053448 0.348733 0.454990 -2.315 0.02060
O2n 1.115171 3.050091 0.395874 2.817 0.00485
ICn 0.007248 1.007275 0.282037 0.026 0.97950
IDMn 0.167159 1.181942 0.340742 0.491 0.62373
ANEVn -0.101613 0.903380 0.530427 -0.192 0.84808
AMIn -0.017282 0.982866 0.324674 -0.053 0.95755
KCn -0.395796 0.673144 0.422623 -0.937 0.34901
VHCn 0.716229 2.046701 1.024804 0.699 0.48462
bmi -0.007109 0.992916 0.015758 -0.451 0.65188
tabac2 0.239885 1.271103 0.182133 1.317 0.18781
sex -0.127581 0.880222 0.177280 -0.720 0.47173
age 0.012324 1.012400 0.006794 1.814 0.06969
TRANSP1 -1.075155 0.341245 0.217639 -4.940 7.81e-07
chisq df p
URGn 1.7642 1 0.1841
KTTINIn 0.0419 1 0.8379
EPOINIn 0.0459 1 0.8303
IRCn 0.0325 1 0.8569
O2n 0.5678 1 0.4511
ICn 2.3551 1 0.1249
IDMn 1.4723 1 0.2250
ANEVn 0.9764 1 0.3231
AMIn 1.3344 1 0.2480
KCn 0.0370 1 0.8475
VHCn 1.8136 1 0.1781
bmi 0.5879 1 0.4432
tabac2 1.1035 1 0.2935
sex 0.6310 1 0.4270
age 0.0500 1 0.8230
TRANSP 9.2069 1 0.0024
GLOBAL 24.3757 16 0.0816
coxph
cph for the ADPKD populationcph for the non ADPKD population| CIM-10 | Diagnostic |
|---|---|
| G45 | accidents ischémiques cérébraux transitories et syndromes apparentés |
| I60 | hémorragie sous-arachnoïdienne |
| I61 | hémorragie intracérébrale |
| I62 | autres hémorragies intracrâniennes non traumatiques |
| I63 | infarctus cérébral |
| I64 | accident vasculaire cérévral non précisé (hémorragique ou infarctus) |
| I74 | embolie et thromose artérielle |
| R471 | dysarthrie et anarthrie |
# COMPLETE FOLLOW-UP
0 2 3 4 7 9 10 12 14 38 42 43 44
15 1 2 1 1 3 2 2 1 1 1 1 3
45 62 68 69 70 71 72 73 100 101 102 103 104
1 1 2 1 1 1 1 2 1 2 1 2 1
127 130 131 132 134 159 160 162 163 164 165 166 186
2 1 2 1 1 2 1 2 1 1 1 1 2
188 191 192 193 218 219 220 221 222 225 246 248 249
2 2 1 2 1 1 2 1 2 1 2 1 1
250 251 253 254 255 278 279 280 281 283 284 285 286
1 2 2 1 1 1 2 1 5 3 1 2 2
287 308 311 314 317 319 339 342 345 346 348 357 358
1 3 1 1 1 1 3 1 3 1 1 1 1
362 364 365 366 367 368 369 370 372 373 374 375 376
1 1 3 3 2 1 3 1 3 2 1 1 2
378 401 402 403 405 407 410 432 434 438 459 462 463
2 1 1 1 1 2 1 1 1 1 1 1 1
465 468 469 489 491 492 495 496 497 500 520 527 550
2 1 1 2 1 1 3 1 1 1 1 1 1
552 553 558 559 582 583 585 587 589 612 614 615 617
1 1 2 1 1 1 2 3 2 1 2 1 2
621 642 643 645 650 652 679 680 681 702 704 711 712
2 2 1 1 1 1 1 1 1 1 1 1 2
718 719 720 721 722 723 724 725 726 727 728 729 730
46 44 54 43 27 42 61 38 63 47 42 74 1
732 734 738 739 742 745 768 772 774 776 794 803 827
2 1 2 1 1 1 1 1 1 1 1 1 1
855 857 859 863 890 915 923 924 950 982 983 984 1008
1 1 1 1 1 1 1 2 1 1 2 1 1
1013 1043 1047 1070 1072 1076 1078 1083 1084 1085 1086 1087 1088
1 2 2 1 1 1 1 37 56 57 57 51 46
1089 1090 1091 1092 1093 1094 1095 1097 1098 1099 1102 1103 1106
57 49 43 58 58 76 1 1 1 1 2 1 1
1109 1132 1140 1158 1164 1167 1195 1222 1256 1261 1282 1287 1320
1 1 1 1 1 1 1 1 1 1 1 1 1
1378 1433 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459
1 1 36 40 44 66 27 38 35 46 42 57 46
1460 1463 1466 1500 1504 1653 1712 1738 1814 1815 1816 1817 1818
54 1 1 1 1 1 1 1 33 48 36 49 35
1819 1820 1821 1822 1823 1824 1825
47 47 36 47 46 40 46
↩︎| Methode | Événement | Pas d’événement |
|---|---|---|
| (1) Hémodialyse | 240 | 1691 |
| (2) Dialyse péritonéale | 15 | 275 |
| (3) Greffe | 0 | 339 |