I am using mixed effects Cox models in the R package coxme, with the model
SurvObj ~ Sex*NE + (1|Year)
where Sex is a categorical fixed effect with two levels each (M and F), NE is a continuous predictor of particular interest, and Year the sampling year used as a random effect.
Here's dummy data/script with longer lifespan in Sex = M, and a positive effect of NE on lifespan:
set.seed(1239)
dumDF = data.frame(
"Sex" = rep(c("M","F"), each = 1000),
"Year" = sample(c("A","B"), replace = T),
"NE" = rnorm(2000,0,5),
"Status" = sample(c(1,2,2,2), 2000, replace = T),
"Life" = rnorm(2000, 50, 5))
dumDF$Life = ifelse(dumDF$Sex=="M", dumDF$Life -10 + dumDF$NE, dumDF$Life+dumDF$NE)
dumDF$SurvObj = with(dumDF, Surv(Life, Status == 2))
coxdum <- coxme(SurvObj ~ Sex*NE + (1|Year), data = dumDF)
coxdum
I would like to get some guidance on how to interpret the result/output:
> coxdum
Cox mixed-effects model fit by maximum likelihood
Data: dumDF
events, n = 1480, 2000
Iterations= 1 7
NULL Integrated Fitted
Log-likelihood -9793.495 -9068.067 -9068.067
Chisq df p AIC BIC
Integrated loglik 1450.86 4 0 1442.86 1421.66
Penalized loglik 1450.86 3 0 1444.86 1428.96
Model: SurvObj ~ Sex * NE + (1 | Year)
Fixed coefficients
coef exp(coef) se(coef) z p
SexM 1.92364026 6.8458338 0.063091867 30.49 0.0e+00
NE -0.17453933 0.8398438 0.009085403 -19.21 0.0e+00
SexM:NE -0.05491849 0.9465623 0.011945520 -4.60 4.3e-06
Random effects
Group Variable Std Dev Variance
Year Intercept 2e-02 4e-04
What I'd like to do is predict the coefficient for the range of NE, specific to either sex. I have done similarly so previously using a different sort of model, but the problem I have here is that the coxme does not give me an intercept for the group where Sex = F and it is necessary for all predictions. How can I predict the coefficent for either group/how can I get the intercept (b1)?
$ coef_{F} = b_1 + b_3 \times x$
$ coef_{M} = (b_1 + b_2) + (b_3 + b_4) \times x$
where $b_1$ is the F specific intercept, $b_2$ is the M specific intercept ("SexM") relative to $b_1$, $b_3$ is the F specific slope ("NE") and $b_4$ is the M specific slope ("SexM:NE") relative to the F specific slope.
Also how does one interpret the number (coef), given that SurvObj is the response, would a negative coefficient for NE mean that there is negative relationship between NE and survival (higher NE = short lifespan/higher rate of mortality) or negative relationship between NE and mortality (higher NE = long lifespan/lower rate of mortality)? Following from my dummy data, where I know NE is positively associated with lifespan, then I believe the coefficient would represent mortality rate, because NE is negative in the example, thus mortality rate decreases with increasing NE.