Reputation: 327
In the latest version of the manual for the package ‘survival’, version 3.8-3, 2 ways to identify clusters in repeat event analyses are exemplified:
The argument cluster, which is exemplified with the code:
fita2 <- aareg(Surv(tstart, tstop, status) ~ treat + age + inherit +
steroids + cluster(id), data=cgd)
The function cluster, where the usage is written "cluster(x)" but the example code is:
marginal.model <- coxph(Surv(time, status) ~ rx, data = rats,
cluster = litter, subset = (sex == 'f'))
Finally, under the function cluster, it says that the "style is now discouraged, use the cluster option instead."
Additionally, in Therneaus book Modeling Survival Data: Extending the Cox Model, cluster() is referred to as the term "+ cluster(id)" and exemplified with:
coxph(Surv(start, stop, status) ~ rx + age + cluster(id), data=Stanford)
I've tried to search Stackoverflow for clarification but without success. Could someone please clarify which of these are in fact to be used, and which one is discouraged, since there is some ambiguity in the documentation?
Sources: https://cran.r-project.org/web/packages/survival/survival.pdf and Modeling Survival Data: Extending the Cox Model (Therneau, Grambsch 2000)
Upvotes: 0
Views: 29