Walid Crampton-Mawass
Ph.D. candidate in Evolutionary Biology
Population Genetics Laboratory
University of Qu?bec at Trois-Rivi?res
3351, boul. des Forges, C.P. 500
Trois-Rivi?res (Qu?bec) G9A 5H7
Telephone: 819-376-5011 poste 3384
On Wed, Mar 3, 2021 at 4:19 PM Kamal Atmeh <kamal.atmeh at hotmail.com> wrote:
> Dear all,
>
> I have some questions, which may sound trivial, pertaining to
> interaction models with MCMCglmm.
>
> I am running the following model with a gaussian distribution and a
> 3-way interaction between two categorical two-level variables (tactic:
> F/H and period PB/B) and one continuous variable (env):
>
> model <- MCMCglmm(lD ~ tactic*period*env
> , random =
> ~sp_phylo+species2+phylo_pop+phylo_popY+phylo_pop_id
> , family = "gaussian"
> , ginverse = list(sp_phylo =
> inv.phylo$Ainv) # include a custom matrix for argument phylo
> , prior = prior1
> , data = Data
> , nitt = 22e+04
> , burnin = 20000
> , thin = 100
> , pr=TRUE)
>
> After looking at the results, I found that the 2-way interaction
> tactic*env from the tactic*period*env interaction was not significant,
> however the 3-way interaction itself was, with the following output in
> the summary:
>
> >>> tacticH:periodB:env 0.17831 0.05360 0.30512 5000
> 0.0052 ** (the intercept represents tactic F and period PB)
>
> I tried to run the model again in order to simplify it using ":" and
> therefore remove the non-significant 2-way interaction:
>
> model2 <- MCMCglmm(lD ~ tactic*period + period*env + *tactic:period:env*
> , random =
> ~sp_phylo+species2+phylo_pop+phylo_popY+phylo_pop_id
> , family = "gaussian"
> , ginverse = list(sp_phylo =
> inv.phylo$Ainv) # include a custom matrix for argument phylo
> , prior = prior1
> , data = Data
> , nitt = 22e+04
> , burnin = 20000
> , thin = 100
> , pr=TRUE)
>
> When using ":", the output of my model returns the posterior mean for
> each level of the categorical variables instead of one level as before:
>
> tacticF:periodPB:env -0.1668620 -0.3554264 0.0005143 195.0 0.0923 .
> tacticF:periodB:env -0.2018706 -0.3783204 -0.0174366 195.0 0.0410 *
> tacticH:periodPB:env -0.1561097 -0.2066183 -0.1093840 118.2 <0.005 **
>
> How should I define the interaction in the model in order to obtain an
> output similar to the one when the "*" interaction was used
> (tacticH:periodB:env) while simplifying and removing the non-significant
> interaction from the 3-way interaction?
>
> Finally, is there a way to automatically compute the posterior mean of
> the continuous variable for each modality of the interaction?
>
> Thank you and stay safe!
>
> Kamal
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
[[alternative HTML version deleted]]