2. Outline for Talk
Recurrent Events
Analyses for Count Outcomes
Survival Analysis Approaches for Repeated Events
Parametric Analyses for Counts
Poisson Regression
Negative Binomial
Non-parametric Analyses for Counts
Mean of Ratios (Q)
Ratio of Means (R)
2
3. Recurrent Events
Usually in survival studies subjects are followed until
they experience a single index event
Death
Cancer
Return to employment
But there are many events of interest that are
repeatable
Seizures
Infections
Hospitalizations
3
4. Recurrent Events
Most of the methods employed in survival analysis
are set up for a single event
But, there have been methods developed for use
with repeated events
Some of these methods come out of the area of
statistical methods developed for count data – these
focus on the count of the number of recurrent event
Some methods come directly out of survival analysis
methods – these focus on the time duration between the
recurrent events
4
5. Recurrent Events
Methods coming out of either area need to address
the domain of the other methods
The count methods also need to address the time
component
The survival methods need to address the number of
events as well as the gap times between events
5
6. Diabetes Control and Complications
Trial (DCCT)
NIH-funded trial
Launched in 1981
To evaluate the effect of intensive blood glucose-
lowering on risk of albuminuria in diabetic subjects
Subjects were randomized to either intensive blood
glucose lowering or conventional treatment
Intensive glucose lowering used self-monitoring 4 or
5 times daily, multiple daily insulin injections or a
pump, diet and exercise
6
7. Diabetes Control and Complications
Trial (DCCT)
A concern was that the intensive glucose lowering
could lead to hypoglycemia
Dizzy spells
Possible comas
Seizures
Hypoglycemia events were tracked as a secondary
outcome (DCCT 1997)
7
8. Diabetes Control and Complications
Trial (DCCT)
Intensive
Treatment
Conventional
Treatment
Subjects 363 352
Hypoglycemia
Events
1723 543
Person-Years of
Follow-Up
2598.5 2480.8
Rate per 100
Person-Years
66.3 21.9
8
9. Count Outcome Approaches
The most basic analysis for count outcomes comes
from the Poisson distribution
𝑃𝑃 𝑦𝑦|𝜆𝜆 =
𝑒𝑒−𝜆𝜆 𝜆𝜆 𝑦𝑦
𝑦𝑦!
Here 𝜆𝜆 is the mean count
y is the observed count (non-negative integer)
One feature of the Poisson distribution is that
Variance = Mean = 𝜆𝜆
9
11. Count Outcome Approaches
The maximum likelihood estimator of the mean is
provided by the sample average
̂𝜆𝜆 =
𝑦𝑦1+𝑦𝑦2+⋯+𝑦𝑦𝑛𝑛
𝑛𝑛
Often people are followed for somewhat different
lengths of time, giving some people more
opportunity to get larger event counts
In this case 𝜆𝜆 is standardized to be per-unit of time
11
12. Count Outcome Approaches
With unequal follow-up times 𝑡𝑡1, 𝑡𝑡2, … , 𝑡𝑡𝑛𝑛
𝑃𝑃 𝑦𝑦|𝑡𝑡, 𝜆𝜆 =
𝑒𝑒−𝜆𝜆𝑡𝑡(𝜆𝜆𝑡𝑡)𝑦𝑦
𝑦𝑦!
Where 𝑡𝑡 is the length of follow-up
With unequal follow-up, the MLE for 𝜆𝜆 is provided
by
̂𝜆𝜆 =
𝑦𝑦1+𝑦𝑦2+⋯+𝑦𝑦𝑛𝑛
𝑡𝑡1+𝑡𝑡2+⋯+𝑡𝑡𝑛𝑛
=
�𝑦𝑦
̅𝑡𝑡
=
𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒
𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝−𝑡𝑡𝑡𝑡 𝑡𝑡𝑡𝑡 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑓𝑓−𝑢𝑢𝑢𝑢
12
13. Count Outcome Approaches
With unequal follow-up times 𝑡𝑡1, 𝑡𝑡2, … , 𝑡𝑡𝑛𝑛
𝑃𝑃 𝑦𝑦|𝑡𝑡, 𝜆𝜆 =
𝑒𝑒−𝜆𝜆𝑡𝑡(𝜆𝜆𝑡𝑡)𝑦𝑦
𝑦𝑦!
Where 𝑡𝑡 is the length of follow-up
With unequal follow-up, the MLE for 𝜆𝜆 is provided
by
̂𝜆𝜆 =
𝑦𝑦1+𝑦𝑦2+⋯+𝑦𝑦𝑛𝑛
𝑡𝑡1+𝑡𝑡2+⋯+𝑡𝑡𝑛𝑛
=
�𝑦𝑦
̅𝑡𝑡
=
𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒
𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝−𝑡𝑡𝑡𝑡 𝑡𝑡𝑡𝑡 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑓𝑓−𝑢𝑢𝑢𝑢
We will see this again
13
14. Link From Poisson to Exponential
If the count of events follows a Poisson distribution,
then the times between events follow an exponential
distribution
𝑓𝑓 𝑡𝑡 𝜆𝜆 = 𝜆𝜆𝑒𝑒−𝜆𝜆𝜆𝜆
A feature of exponential survival times is that the
hazard event rate is 𝜆𝜆 and is constant over time
The mean time to an event is
1
𝜆𝜆
Gives a way to estimate 𝜆𝜆 in a survival analysis
setting (rather than a count data setting)
14
16. Poisson Regression
In Poisson regression we model the expected count
for an observation as a function of predictor
variables
Poisson regression is a log-linear model so that the
log of the mean is set equal to a linear combination
of the predictors
16
17. Poisson Regression
𝑙𝑙𝑙𝑙 𝑙𝑙 𝜆𝜆𝜆𝜆 = 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥
This leads to
𝑙𝑙𝑙𝑙 𝑙𝑙 𝜆𝜆 + 𝑙𝑙𝑙𝑙 𝑙𝑙 𝑡𝑡 = 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥
So, we get
𝑙𝑙𝑙𝑙 𝑙𝑙 𝜆𝜆 = 𝛽𝛽0 + 𝛽𝛽1 𝑥𝑥 − 𝑙𝑙𝑙𝑙 𝑙𝑙 𝑡𝑡
The −𝑙𝑙𝑙𝑙 𝑙𝑙 𝑡𝑡 is called the offset and corrects for the
differences in follow-up time between subjects
The model can be expressed 𝜆𝜆 = 𝑒𝑒 𝛽𝛽0+𝛽𝛽1 𝑥𝑥−𝑙𝑙𝑙𝑙𝑙𝑙 𝑡𝑡
17
18. Poisson Regression
This model is fit using maximum likelihood
SAS GENMOD
The 𝛽𝛽 estimates for predictors are interpreted as
logs of incidence rate ratios
A one-unit increase in 𝑥𝑥 gives a ratio of 𝑒𝑒𝑒𝑒𝑒𝑒 𝛽𝛽1 in the
expected count
If 𝑥𝑥 codes for a group difference (0 = control, 1 =
treatment), then 𝑒𝑒𝑒𝑒𝑒𝑒 𝛽𝛽1 corresponds to the ratio of
counts in the treated group divided by counts in the
control group
18
19. Poisson Regression in DCCT
proc genmod;
model nevents = group
/ dist = poisson
link = log
offset = lnyears;
TITLE1 'Poisson regression models of risk
of hypoglycemia';
title2 'unadjusted treatment group effect';
19
21. Poisson Regression in DCCT
21
Highly significant result!
But, is it based on a reasonable model
for the data?
Analysis Of Parameter Estimates
Parameter DF Estimate
Standard
Error
Wald 95%
Confidence Limits Chi-Square Pr > ChiSq
Intercept 1 -1.5190 0.0429 -1.6031 -1.4349 1252.90 <.0001
group Exp 1 1.1081 0.0492 1.0117 1.2046 507.01 <.0001
group Std 0 0.0000 0.0000 0.0000 0.0000 . .
Scale 0 1.0000 0.0000 1.0000 1.0000
22. Poisson Regression
The big limitation for Poisson regression is
overdispersion
The data are overdispersed when the variation in the
observed counts is greater that the mean value
Under Poisson model these should match
Variance in the counts much greater than the means
Goodness of fit testing for overdispersion is
typically done in Poisson regression
22
23. Overdispersion in DCCT
23
Criteria For Assessing Goodness Of Fit
Criterion DF Value Value/DF
Deviance 713 3928.7828 5.5102
Scaled Deviance 713 3928.7828 5.5102
Pearson Chi-Square 713 5131.3429 7.1968
Scaled Pearson X2 713 5131.3429 7.1968
Log Likelihood 775.1804
24. Overdispersion in DCCT
24
Criteria For Assessing Goodness Of Fit
Criterion DF Value Value/DF
Deviance 713 3928.7828 5.5102
Scaled Deviance 713 3928.7828 5.5102
Pearson Chi-Square 713 5131.3429 7.1968
Scaled Pearson X2 713 5131.3429 7.1968
Log Likelihood 775.1804
If model fits well then Value/DF should be close to 1.0
• Large ratios indicate overdispersion or model
misspecification
25. Poisson Regression
For a clinical trial, our primary goal is a good test
of treatment effect, so wouldn’t normally need to
include covariates
But, could try to remove excess variation by
controlling for covariates
25
26. Poisson Regression in DCCT
proc genmod; class group;
model nevents = group
insulin duration female
adult bcval5 hbael hxcoma
/ dist = poisson
link = log
offset = lnyears
covb;
title2 'covariate adjusted treatment group
effect';
26
28. Poisson Regression in DCCT
28
Analysis Of Parameter Estimates
Parameter DF Estimate
Standard
Error
Wald 95%
Confidence Limits Chi-Square Pr > ChiSq
Intercept 1 -0.9568 0.2174 -1.3829 -0.5308 19.38 <.0001
group Exp 1 1.0845 0.0493 0.9879 1.1812 483.91 <.0001
group Std 0 0.0000 0.0000 0.0000 0.0000 . .
insulin 1 0.0051 0.0995 -0.1898 0.2000 0.00 0.9593
duration 1 0.0015 0.0006 0.0004 0.0026 6.79 0.0092
female 1 0.1794 0.0424 0.0963 0.2624 17.93 <.0001
adult 1 -0.5980 0.0656 -0.7265 -0.4694 83.13 <.0001
bcval5 1 -0.5283 0.3630 -1.2398 0.1833 2.12 0.1456
hbael 1 -0.0335 0.0151 -0.0631 -0.0038 4.89 0.0271
hxcoma 1 0.6010 0.0685 0.4669 0.7352 77.09 <.0001
Scale 0 1.0000 0.0000 1.0000 1.0000
Still very significant, but does the model fit better?
29. Poisson Regression in DCCT
29
Criteria For Assessing Goodness Of Fit
Criterion DF Value Value/DF
Deviance 706 3707.7027 5.2517
Scaled Deviance 706 3707.7027 5.2517
Pearson Chi-Square 706 4792.7876 6.7887
Scaled Pearson X2 706 4792.7876 6.7887
Log Likelihood 885.7204
The fit is better with the covariates included, but still very
overdispersed.
30. Poisson Regression
Another approach that can be used to remove
overdispersion is to use a variance correction
Pearson correction
Standard approach – has the actual variance equal the
modeled variance multiplied by an estimated overdispersion
parameter
Corrects the standard errors and test results to account for
the overdispersion
GEE correction based on robust sandwich variance
estimator
Based on a robust sandwich-variance estimator
30
31. GEE Poisson Regression in DCCT
proc genmod;
class group subnum;
model nevents = group
/ dist = poisson
link = log
offset = lnyears
type3;
repeated subject=subnum / type=unstr;
title2 ‘GEE unadjusted treatment group
effect';
31
32. GEE Poisson Regression in DCCT
32
Analysis Of GEE Parameter Estimates
Empirical Standard Error Estimates
Parameter Estimate
Standard
Error
95% Confidence
Limits Z Pr > |Z|
Intercept -1.5190 0.1003 -1.7155 -1.3225 -15.15 <.0001
group Exp 1.1081 0.1256 0.8620 1.3543 8.82 <.0001
group Std 0.0000 0.0000 0.0000 0.0000 . .
33. GEE Poisson Regression in DCCT
33
Analysis Of GEE Parameter Estimates
Empirical Standard Error Estimates
Parameter Estimate
Standard
Error
95% Confidence
Limits Z Pr > |Z|
Intercept -1.5190 0.1003 -1.7155 -1.3225 -15.15 <.0001
group Exp 1.1081 0.1256 0.8620 1.3543 8.82 <.0001
group Std 0.0000 0.0000 0.0000 0.0000 . .
Still very significant treatment effect, but note that standard error
is much larger in this model.
Standard error was 0.0492 in Poisson model with only treatment.
34. Negative Binomial Regression
The negative binomial distribution is another count
data distribution with more variance than the
Poisson
Can be used to give the probability that n trials are
required in order to get m successes (m≤n)
Model takes the form 𝜆𝜆 = 𝑒𝑒 𝛽𝛽0+𝛽𝛽1 𝑥𝑥−𝑙𝑙𝑙𝑙𝑙𝑙 𝑡𝑡 +𝜀𝜀
Where 𝑒𝑒𝑒𝑒𝑒𝑒 𝜀𝜀 has a gamma distribution
Can be considered to be a Poisson model with gamma-
distributed random effects
Parametric approach to overdispersion
34
35. Negative Binomial Regression in
DCCT
proc genmod;
class group;
model nevents = group
/ dist = negbin
link = log
offset = lnyears;
title2 ‘Neg Binomial unadjusted
treatment group effect';
35
37. Negative Binomial Regression in
DCCT37
Analysis Of Parameter Estimates
Parameter DF Estimate
Standard
Error
Wald 95%
Confidence
Limits Chi-Square Pr > ChiSq
Intercept 1 -1.5510 0.0902 -1.728 -1.374 295.60 <.0001
group Exp 1 1.1173 0.1215 0.8791 1.3555 84.52 <.0001
group Std 0 0.0000 0.0000 0.0000 0.0000 . .
Dispersion 1 2.1863 0.1649 1.8631 2.5095
The results here are quite similar to those of the GEE Poisson
model, with almost the same standard errors.
39. Survival Analyses
Repeated events
Cox model on time to first event
Use Andersen-Gill approach and partition follow-up
time according to which event it applies
Restart the follow-up time clock after an event
Multiple observations per subject
Need to be concerned about correlation
Unobserved heterogeneity (due to the correlation) can bias
estimates downward while significance is overstated
39
40. Survival Analysis in DCCT
proc phreg data=three;
model stopday*event(0) =
intgroup/ risklimits;
title1 'Cox Model for First
Event';
run;
40
41. Survival Analysis in DCCT
41
Analysis of Maximum Likelihood Estimates
Variable DF
Parameter
Estimate
Standard
Error Chi-Square Pr > ChiSq
Hazard
Ratio
95% Hazard
Ratio
Confidence
Limits
INTGROUP 1 0.77252 0.10354 55.6711 <.0001 2.165 1.768 2.652
42. Survival Analysis in DCCT
proc phreg data=four;
model gaptime*event(0) =
intgroup priorgap /
risklimits;
title1 'Cox Model for
Second Event - Correlation';
run;
42
43. Survival Analysis in DCCT
43
Analysis of Maximum Likelihood Estimates
Variable DF
Parameter
Estimate
Standard
Error Chi-Square Pr > ChiSq
Hazard
Ratio
95% Hazard
Ratio
Confidence
Limits
INTGROUP 1 0.27790 0.12451 4.9814 0.0256 1.320 1.034 1.685
priorgap 1 -0.000523 0.000114 20.9317 <.0001 0.999 0.999 1.000
So, having a longer time to the first event reduces risk of the
second event. So correlation in these times to events is quite
substantial.
44. Survival Analysis in DCCT
proc phreg data=six
covsandwich(aggregate);
model gaptime*event(0) =
intgroup / risklimits;
id patient;
title1 'GEE Cox Model for
all Events';
run;
44
46. Survival Analysis in DCCT
46
Analysis of Maximum Likelihood Estimates
Variable DF
Parameter
Estimate
Standard
Error
StdErr
Ratio Chi-Square Pr > ChiSq
Hazard
Ratio
95% Hazard
Ratio
Confidence
Limits
INTGROUP 1 0.67526 0.08988 1.808 56.4435 <.0001 1.965 1.647 2.343
So, accounting for the correlation increases the standard error by
about 80%. However, the resulting hazard ratio is much less than
the other estimates so far.
47. Nonparametric Analyses
Work done with Jing Xu
Motivated by his experiences with analysis of
repeated events at
The SDAC for the AIDS Clinical Trials Group
Later experience in the pharmaceutical industry
47
48. Nonparametric Analyses
In follow-up studies of recurrent events, there were
studies taking a non-parametric approach to
analysis of two-arm trials by
𝑞𝑞𝑖𝑖𝑖𝑖 =
𝑦𝑦𝑖𝑖𝑖𝑖
𝑡𝑡𝑖𝑖𝑖𝑖
𝑦𝑦𝑖𝑖𝑖𝑖 is the number of events for subject i in arm j
(j is 0 or 1)
𝑡𝑡𝑖𝑖𝑖𝑖 is the total length of follow-up for subject i in group j
𝑞𝑞𝑖𝑖𝑖𝑖 represents a subject-specific event rate
48
49. Nonparametric Analyses
𝑞𝑞𝑖𝑖𝑖𝑖 were analyzed without assuming any particular
distribution by standard two-sample tests
Student t-test
Wilcoxon test
Van der Waerden test
49
50. Nonparametric Analyses
For estimation, the means of the subject-specific
event rates were calculated for each group
�𝑄𝑄𝑗𝑗 =
1
𝑛𝑛𝑗𝑗
∑𝑖𝑖=1
𝑛𝑛𝑗𝑗
𝑞𝑞𝑖𝑖𝑖𝑖 =
1
𝑛𝑛𝑗𝑗
∑𝑖𝑖=1
𝑛𝑛𝑗𝑗 𝑦𝑦𝑖𝑖𝑖𝑖
𝑡𝑡𝑖𝑖𝑖𝑖
These �𝑄𝑄𝑗𝑗 could then be used to estimate ratios of
the rates and differences in the rates by group
�𝑅𝑅 𝑅𝑅𝑄𝑄 =
�𝑄𝑄1
�𝑄𝑄0
�𝑅𝑅 𝑅𝑅𝑄𝑄 = �𝑄𝑄1 − �𝑄𝑄0
50
51. Nonparametric Analyses
Our concern about this 𝑞𝑞𝑖𝑖𝑖𝑖 approach was that
There could be outliers – subjects having a large
number of events in a short amount of time who then
drop out of the study early
The asymptotic consistency of the �𝑄𝑄𝑗𝑗 estimators
depends on both the numbers of events and the amount
of follow-up increasing within all subjects
51
52. Nonparametric Analyses
A different approach had been suggested by L.J.
Wei
�𝑅𝑅𝑗𝑗 =
𝑥𝑥𝑗𝑗
𝑡𝑡𝑗𝑗
= �
∑𝑖𝑖=1
𝑛𝑛𝑗𝑗
𝑥𝑥𝑖𝑖𝑖𝑖
∑𝑖𝑖=1
𝑛𝑛𝑗𝑗
𝑡𝑡𝑖𝑖𝑖𝑖
=
𝑥𝑥𝑗𝑗
�𝑡𝑡𝑗𝑗
Ratio of the means, not the mean of the ratios
52
53. Nonparametric Analyses
A different approach had been suggested by L.J.
Wei
�𝑅𝑅𝑗𝑗 =
𝑥𝑥𝑗𝑗
𝑡𝑡𝑗𝑗
= �
∑𝑖𝑖=1
𝑛𝑛𝑗𝑗
𝑥𝑥𝑖𝑖𝑖𝑖
∑𝑖𝑖=1
𝑛𝑛𝑗𝑗
𝑡𝑡𝑖𝑖𝑖𝑖
=
𝑥𝑥𝑗𝑗
�𝑡𝑡𝑗𝑗
Ratio of the means, not the mean of the ratios
This is just the standard Poisson events per person-
time without assuming the distribution
53
54. Nonparametric Analyses
Can use the �𝑅𝑅𝑗𝑗 to estimate rate ratio and difference
in rates between groups
�𝑅𝑅𝑅𝑅𝑅𝑅 =
�𝑅𝑅1
�𝑅𝑅0
�𝑅𝑅 𝑅𝑅𝑅𝑅 = �𝑅𝑅1 − �𝑅𝑅0
54
55. Nonparametric Analyses
�𝑅𝑅𝑗𝑗 advantages
Average out any outliers
Makes consistency more reasonable as it uses the group
totals for number of events and total follow-up time
�𝑅𝑅𝑗𝑗 disadvantages
Measure is group-specific and not subject-specific
Can’t use standard 2-sample tests
55
56. Nonparametric Analyses
Asymptotic forms of the variance for the �𝑅𝑅
measures are in the Xu and LaValley paper in the
references
Confidence intervals based on Fieller’s method and
resampling
In this talk, I’ll use resampling methods to evaluate
the �𝑅𝑅𝑗𝑗 measures
Permutation tests
Bootstrap confidence intervals
56
58. Nonparametric Analyses
In simulations, we found that the �𝑄𝑄𝑗𝑗 with a non-
parametric test and the �𝑅𝑅𝑗𝑗 methods maintained the
type-1 error and had comparable power over a
range of sample sizes
The �𝑅𝑅𝑗𝑗 methods provided reasonable confidence
interval coverage if the sample sizes were at least
100 per group
58
59. Nonparametric Analyses
In the paper we use the nonparametric methods on
a dataset for recurrence of bladder cancer in a
two-arm clinical trial of the drug thiotepa
59
64. Nonparametric Analyses in DCCT
64
Test Test Statistic P-value
t-test of qij 8.28 P < 0.0001
Van der Waerden
test of qij
8.77 P < 0.0001
Wilcoxon test of qij 8.57 P < 0.0001
65. Nonparametric Analyses in DCCT
65
Estimator Estimate Permutation Test
P-value*
Rate Difference (Q) 0.43681 P < 0.0005
Rate Difference (R) 0.44415 P < 0.0005
Rate Ratio (Q) 3.08059 P < 0.0005
Rate Ratio (R) 3.02872 P < 0.0005
*Based on 2000
permutations
66. Nonparametric Analyses in DCCT
66
Q versus R
measures of rate
difference across
2000 permuted
datasets
68. Nonparametric Analyses in DCCT
68
Q versus R
measures of rate
difference across
2000 bootstrap
samples
69. Nonparametric Analyses
Both Q and R measures work well for reasonable
sized datasets
In these DCCT data, both are fine
In the bladder cancer data, the R (ratio of means)
seems to have a slight edge
69
70. Conclusions
There are a lot of good options for the analysis of
repeated events
GEE Survival models
Gee Poisson Regression
Negative binomial regression
Q and R measures – especially in clinical trial setting
Worthwhile to work with several as secondary
analyses to verify consistency
70
71. Main References
Allison PD. Survival Analysis Using SAS: a Practical
Guide, second edition. SAS Publishing, 2010.
Lachin JM. Biostatistical Methods: the Assessment of
Relative Risks. Wiley, 2000.
Xu J, LaValley M. One-sample and two-sample
analysis of heterogeneous person-time data in
clinical trials. Pharmaceutical Statistics 2012; 11:
194 – 203.
71