Skip to content
Prev 19069 / 20628 Next

MCMCglmm covariance matrix specification

Hey Walid,

I had a similar problem a few months ago, I didn't want 1 trait to have any
covariance. I was not able to find a solution to it but after reading
several articles, I figured out a way.

Instead of not calculating the covariances at all (which I am not sure if
it's possible), you can set the value to 0 in the prior.

Here is my example-
I have 9 traits and I do not want my last trait to covary with any other
trait. Hence I set it to a very low value (0.001) for the within individual
covariance and use the fix command to specify which trait it is (in this
instance  my 9th trait).

final_priorv1 <- list(R = list(V =diag(c(1,1,1,1,1,1,1,1,0.001),9,9), nu =
0.002, fix = 9),
                      G = list(G1 = list(V = diag(9), nu = 9,
                                         alpha.mu = rep(0, 9),
                                         alpha.V  = diag(25^2,9,9))))

Remember this is within individual variance set to 0.001, you will still be
calculating the among individual covariance.

Found this solution from Dr. Houslay's MCMCGlmm Tutorial page 14. Link
here-->
https://tomhouslay.files.wordpress.com/2017/02/indivvar_mv_tutorial_mcmcglmm.pdf
Something similar from his other tutorial page 31-->
https://tomhouslay.files.wordpress.com/2017/02/indivvar_plasticity_tutorial_mcmcglmm1.pdf

With this prior, I was able to use the unstructured (us) covariance matrix
and I was able to get what I needed.

I feel what you are looking for is fairly similar, and I believe this
solution might work for you.

 Happy coding!

Regards,
Srivats.

Srivats Chari
<https://sites.google.com/ucd.ie/wildl-ecol-behav-at-ucd/people#h.p_DyWP_UxHDqgq>
Post-Graduate Research Student
Twitter- @WildlifeVats <https://twitter.com/WildlifeVats>

Laboratory of Wildlife Ecology and Behaviour
<https://sites.google.com/ucd.ie/wildl-ecol-behav-at-ucd>
School of Biology and Environmental Science (SBES),
University College Dublin (UCD).


On Wed, Feb 24, 2021 at 6:29 PM Walid Crampton-Mawass <
walidmawass10 at gmail.com> wrote: