0
$\begingroup$

I have the following generalized linear mixed effects model (mcmcglmm in R) with data based on this paper. Sex is a two level factor (M or F), Group a two level factor (LL, LO), Mort a continuous explanatory variable and Life a continuous response.

What I would like to know is how to estimate the predicted Life from the model for the linear relationship with Mort for the four combinations of sex and group;

mod2 = MCMCglmm(Life ~ Mort*Sex*Group,
    random = ~ Pop:Year,
    rcov = ~units,  
    family = "gaussian", 
    start = list(QUASI = FALSE), 
    data = DF1) 

summary(mod2)
...
                                  post.mean  l-95% CI  u-95% CI eff.samp  pMCMC    
b1 - (Intercept)                   59.49914  58.09025  60.95132   1000.0 <0.001 ***
b2 - Mort                         -31.71989 -41.68107 -22.98638   1000.0 <0.001 ***
b3 - SexM                          -2.19366  -4.21752  -0.01809   1000.0  0.040 *  
b4 - GroupLO                       -0.31138  -2.95227   2.55287    876.9  0.834    
b5 - Mort:SexM                      5.89476  -7.46922  18.93982   1000.0  0.364    
b6 - Mort:GroupLO                  10.53922  -8.40778  27.26750    913.3  0.220    
b7 - SexM:GroupLO                   2.15210  -1.41979   5.81856   1159.6  0.282    
b8 - Mort:SexM:GroupLO              9.79784 -14.48409  32.54522   1001.8  0.428

I'm struggling to find good literature that explains how to estimate the linear relationship when there are multiple categorical interactions occurring.

What would the respective calculations be? Here are my attempts:

$ Life_{F,LL} = b_1 + b_2 \times x$

$ Life_{M,LL} = (b_1 + b_3) + (b_2 + b_5) \times x$

$ Life_{F,LO} = (b_1 + b_4) + (b_2 + b_6) \times x$

$ Life_{M,LO} = (b_1 + b_3 + b_4) + (b_2 + b_5 + b_6 + b_7 + b_8) \times x$

What are the correct formula to get the predicted response for each group?


Update; after more thought I think $Life_{M,LO}$ might be this, where all of the terms without mort form the intercept and all those with mort form the slope:

$ Life_{M,LO} = (b_1 + b_3 + b_4 + b_7) + (b_2 + b_5 + b_6 + b_8) \times x$

$\endgroup$
0
$\begingroup$

I have worked the answer out to be the following;

$ Life_{F,LL} = b_1 + b_2 \times x$

$ Life_{M,LL} = (b_1 + b_3) + (b_2 + b_5) \times x$

$ Life_{F,LO} = (b_1 + b_4) + (b_2 + b_6) \times x$

$ Life_{M,LO} = (b_1 + b_3 + b_4 + b_7) + (b_2 + b_5 + b_6 + b_8) \times x$

This is supported using the predict() function within R, which gives matching values.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.