[R] How to pass a nested random effect with frailty in coxph()
Therneau, Terry M., Ph.D.
therneau at mayo.edu
Fri Dec 12 14:05:45 CET 2014
Use the coxme funtion (package coxme), which has the same syntax as lme4.
The frailty() function in coxph only handles the simple case of a random intercept.
On 12/12/2014 05:00 AM, r-help-request at r-project.org wrote:
> I have a very simple Cox regression model in which I need to include a
> nested random effect: individual nested in treatment. I know how to pass a
> single random effect - e.g. frailty(id)- but how can I specify the nested
> random (id nested in treatment) effect using frailty?
> The equivalent in lme4 would be (treatment|id)
More information about the R-help