Therneau, Terry M., Ph.D.
2014-Dec-12 13:05 UTC
[R] How to pass a nested random effect with frailty in coxph()
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. Terry Therneau On 12/12/2014 05:00 AM, r-help-request at r-project.org wrote:> Hi, > 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) > > Thanks! > > David