count any patient who had multiple rows in the dataset
## [1] 0.508
count only those who had repeated fistulogram in the same lesion
## [1] 0.218
## [1] 0.258
## lesion
## locationofthefistula 2 4 5 6 7 8 9 10 11 12 14
## 1 12 3 0 3 4 0 1 0 0 2 0
## 2 22 6 38 13 6 1 11 1 3 0 27
## 3 9 9 0 4 3 1 5 0 1 0 10
## 25 50 75
## lesion.group=l12l13l14 84 107.0 187
## lesion.group=l2l4 91 108.5 255
## lesion.group=l5l6l7l8 70 105.0 216
## Analysis of Deviance Table
## Cox model: response is Surv(surv.days, as.numeric(event))
## Terms added sequentially (first to last)
##
## loglik Chisq Df Pr(>|Chi|)
## NULL -285.88
## lesion.group -284.81 2.1344 2 0.344
## 25 50 75
## 75 111 215
## Call: survfit(formula = Surv(surv.days, as.numeric(event)) ~ 1, data = dat.surv.lesion)
##
## time n.risk n.event survival std.err lower 95% CI upper 95% CI
## 2 105 1 0.9905 0.00948 0.9721 1.000
## 5 104 1 0.9810 0.01334 0.9552 1.000
## 8 103 1 0.9714 0.01626 0.9401 1.000
## 12 102 1 0.9619 0.01868 0.9260 0.999
## 15 100 2 0.9427 0.02273 0.8992 0.988
## 18 98 1 0.9330 0.02445 0.8863 0.982
## 28 97 2 0.9138 0.02747 0.8615 0.969
## 36 95 1 0.9042 0.02881 0.8494 0.962
## 41 94 4 0.8657 0.03340 0.8027 0.934
## 42 90 1 0.8561 0.03438 0.7913 0.926
## 43 89 2 0.8369 0.03620 0.7688 0.911
## 54 87 3 0.8080 0.03860 0.7358 0.887
## 66 84 1 0.7984 0.03932 0.7249 0.879
## 70 83 2 0.7791 0.04066 0.7034 0.863
## 72 81 3 0.7503 0.04243 0.6716 0.838
## 75 78 3 0.7214 0.04395 0.6402 0.813
## 76 75 1 0.7118 0.04440 0.6299 0.804
## 84 73 1 0.7021 0.04485 0.6194 0.796
## 85 72 1 0.6923 0.04527 0.6090 0.787
## 89 71 2 0.6728 0.04605 0.5883 0.769
## 91 69 2 0.6533 0.04673 0.5678 0.752
## 93 67 1 0.6436 0.04704 0.5577 0.743
## 94 66 2 0.6241 0.04760 0.5374 0.725
## 98 64 4 0.5850 0.04845 0.4974 0.688
## 99 60 1 0.5753 0.04862 0.4875 0.679
## 100 59 2 0.5558 0.04888 0.4678 0.660
## 105 57 3 0.5265 0.04914 0.4385 0.632
## 107 54 1 0.5168 0.04919 0.4288 0.623
## 109 53 1 0.5070 0.04922 0.4192 0.613
## 111 52 2 0.4875 0.04922 0.4000 0.594
## 112 50 6 0.4290 0.04877 0.3434 0.536
## 114 44 1 0.4193 0.04862 0.3340 0.526
## 123 43 1 0.4095 0.04846 0.3248 0.516
## 138 42 1 0.3998 0.04828 0.3155 0.507
## 144 41 1 0.3900 0.04807 0.3063 0.497
## 154 40 1 0.3803 0.04785 0.2972 0.487
## 168 39 1 0.3705 0.04761 0.2880 0.477
## 170 38 1 0.3608 0.04734 0.2790 0.467
## 178 37 1 0.3510 0.04706 0.2699 0.457
## 182 36 2 0.3315 0.04642 0.2520 0.436
## 185 34 1 0.3218 0.04607 0.2431 0.426
## 187 33 1 0.3120 0.04569 0.2342 0.416
## 192 32 1 0.3023 0.04529 0.2254 0.405
## 195 31 1 0.2925 0.04487 0.2166 0.395
## 197 30 1 0.2828 0.04442 0.2078 0.385
## 201 29 2 0.2633 0.04344 0.1905 0.364
## 213 27 1 0.2535 0.04291 0.1819 0.353
## 215 26 1 0.2438 0.04236 0.1734 0.343
## 216 25 1 0.2340 0.04177 0.1649 0.332
## 226 24 1 0.2243 0.04115 0.1565 0.321
## 235 23 1 0.2145 0.04050 0.1482 0.311
## 252 22 2 0.1950 0.03910 0.1317 0.289
## 255 19 1 0.1848 0.03836 0.1230 0.278
## 267 18 1 0.1745 0.03758 0.1144 0.266
## 272 17 1 0.1642 0.03674 0.1059 0.255
## 300 15 1 0.1533 0.03589 0.0969 0.243
## 322 14 1 0.1423 0.03495 0.0880 0.230
## 401 6 1 0.1186 0.03630 0.0651 0.216
## 436 3 1 0.0791 0.04034 0.0291 0.215
## rowSums(dat[, 15:26] == "Y")
## dat$locationofthefistula 0 1 2 3 4
## 1 0 19 11 6 0
## 2 4 93 45 9 2
## 3 4 49 21 0 0