[R] Correlation between random effects in the package coxme

Terry Therneau therneau at mayo.edu
Mon Sep 17 15:16:30 CEST 2012



On 09/14/2012 05:00 AM, r-help-request at r-project.org wrote:
> Hello,
>
> Why the correlation between the random effects is negative?
> library(coxme)
> rats1<- coxme(Surv(time, status) ~ (1|litter), rats)
> random.effects(rats1)[[1]] #one value for each of the 50 litters
> print(rats1)
>
> rats2<- lmekin(time ~ (1|litter), rats)
> fixed.effects(rats2)
> random.effects(rats2)[[1]] #one value for each of the 50 litters
> print(rats2)
>
> cor(random.effects(rats1)[[1]],random.effects(rats2)[[1]])
>
> Thanks

Because coxph models the death rate, so large coefficients indicate bad news, and lme is 
modeling the surival time where large coefficients are good news.

Terry T




More information about the R-help mailing list