[R-sig-ME] MCMCglmm Prior for a Binary Trait with a Random Interaction w/ "animal"
c@meron@@o @end|ng |rom m@||@utoronto@c@
Sat Mar 7 23:39:18 CET 2020
Just to follow up on my original question. I've constructed (hopefully appropriate) priors for my multivariate models (binary-binary, binary-gaussian, etc).. However I am receiving error messages after my models have run.
Could anyone suggest on any possible solutions?
I am receiving these errors to my code below:
1. In MCMCglmm ... all observations are missing for error term 1 gaussian: liabilities sampled from Norm(0,1)
2. In MCMCglmm ... all observations are missing for error term 2 gaussian: liabilities sampled from Norm(0,1)
3. Some fixed effects not estimable and have been removed. Use singular.ok=TRUE to sample these effects.
plastic.survival <- total.2019
prior1.1 <- list(R = list(V = diag(2), nu = 2, fix = 1),
G = list(G1 = list(V = diag(2), nu = 15, alpha.mu = c(0,0), alpha.V = diag(c(1.25, 1.25))),
G2 = list(V = diag(2), nu = 15, alpha.mu = c(0,0), alpha.V = diag(c(1.25, 1.25)))))
PL_model1.1 <- MCMCglmm(flower ~ treatment + plot - 1, random = ~us(treatment):animal + us(treatment):matID,
ginverse = list(animal = Ainv), rcov = ~us(treatment):units,
family = "threshold", data = plastic.survival, prior = prior1.1, #Bernoulli distribution
nitt = 2100000, thin = 1000, burnin = 100000, verbose = T, pr = TRUE, trunc = TRUE)
On the other note.. I am also considering on moving to the package 'brms' in the near future since the syntax follows the commonly used lme4, and it seems more flexible to various distributions and multi-level experimental designs. Just wondering also if anyone has attempted constructing priors in this package for quantitative genetic models.
Masters Student | Plant Evolutionary Responses to Climate Change | Weis Lab
Department of Ecology & Evolutionary Biology
University of Toronto
ESC2083, St. George Campus
From: Pierre de Villemereuil <pierre.de.villemereuil using mailoo.org>
Sent: February 28, 2020 3:44 AM
To: r-sig-mixed-models using r-project.org <r-sig-mixed-models using r-project.org>
Cc: Cameron So <cameron.so using mail.utoronto.ca>
Subject: Re: [R-sig-ME] MCMCglmm Prior for a Binary Trait with a Random Interaction w/ "animal"
Both V and alpha.V are matrices and should be of same dimensions (which seems to be 2 in your case?).
A long time ago, I wrote a script to be able to visualise the prior distributions in the mono- and multivariate case of the extended parameters. I'm afraid it's not in the best shape as I wrote it quickly, but maybe it can help:
(Note that this script assumes only the second trait is binomial for the multivariate case, but you can change this easily by setting fix = 1 instead of fix = 2).
I don't guarantee that keeping nu = 1000 for the multivariate case is the best solution (or even a sane one, as it could be extremely informative on the covariances), so using the script to visualise the priors, especially for the correlations might be a good idea.
Hope this helps,
Le jeudi 27 f�vrier 2020, 23:04:35 CET Cameron So a �crit :
> Hi all,
> I am trying to measure the genetic variance in plasticity when different plant genotypes are planted into two different environments. The trait of interest is binary (germination).
> Without fitting an interaction term, the prior for a binary trait follows a Chi square distribution of df = 1, based on suggestions in de Villemereuil's (2012) paper. However, I wish to add an interaction term with my "animal" term (which is, actually in my case, the ID of a plant individual). If I wish to keep this prior for an interaction between the environment (a.k.a treatment), should I specify the covariance matrix in the alpha.V or V section of the prior?
> Essentially, I want to incorporate suggestions made in Arnold et al. (2019)'s paper.
> Below is my code:
> prior_germ <- list(R = list(V = 1, fix = 1),
> G = list(G1 = list(V = 1, nu = 1000, alpha.mu = 0, alpha.V = diag(2)),
> G2 = list(V = 1, nu = 1000, alpha.mu = 0, alpha.V = diag(2))))
> MCMCglmm(germ ~ treatment + plot, random = ~idh(treatment):animal + ~idh(treatment):animal,
> ginverse = list(animal = Ainv),
> family = "threshold", data = plastic.Germination, prior = prior_germ, #Bernoulli distribution
> nitt = 1100000, thin = 500, burnin = 100000, verbose = T, pr = TRUE, trunc = TRUE)
> Thanks for any advice in advance!
> Cameron So
> Master's Student | Plant Evolutionary Responses to Climate Change | Weis Lab
> Department of Ecology & Evolutionary Biology
> University of Toronto
> ESC2083, St. George Campus
> [[alternative HTML version deleted]]
> R-sig-mixed-models using r-project.org mailing list
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models