1. How many patients have repeat fistulogram in the follow up period?

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

2. How many patients developed new lesions in the subsequent fistulogram?

## [1] 0.258

3. The distribution of lesions in each type of fistula (locationoffistula)

##                     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

4. Angioplasty survival for each lesion:

##                         25  50 75
## lesion.group=l12l13l14  91 195 NA
## lesion.group=l2l4      182  NA NA
## lesion.group=l5         89  NA NA
## lesion.group=l6l7l8    100 252 NA
## 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         -376.10                      
## lesion.group -370.48 11.24  3     0.0105 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

## 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         -155.09                       
## lesion.group -153.06 4.0481  1    0.04422 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

##  25  50  75 
## 105 436  NA

5. The distribution of number of lesions in each fistulogram

##                         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