Vinicius Santos
2012-Sep-14 00:04 UTC
[R] Correlation between random effects in the package coxme
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 [[alternative HTML version deleted]]
Terry Therneau
2012-Sep-17 13:16 UTC
[R] Correlation between random effects in the package coxme
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]]) > > ThanksBecause 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
Reasonably Related Threads
- help with coxme
- How to extract p value from the lmekin object obtained by fitting mixed model with function lmekin() in package coxme?
- Import data set from another package?
- no solution yet, please help: extract p-value from mixed model in kinship package
- Vignette problem