[R-sig-ME] Specifying bivariate priors with different distributions in MCMCglmm
Cones, Alexandra G.
@|ex@cone@ @end|ng |rom uky@edu
Mon Nov 6 14:00:44 CET 2023
Hello all!
I am having trouble specifying my priors for a bivariate model in MCMCglmm with two response variable distributions. I want to see if they covary at the among-individual level ("ID"). I have two response variables, one is gaussian (parental feeding rate of chicks per hour "Rate_h") and one is binomial (proportion of chicks that survive "propfledged").
I am able to specify the priors and model successfully for the binomial case when it is univariate:
prior1 <- list(G = list(G1 = list(V = diag(1), nu = 0.002)), R = list(V = 0.5, nu = 0.002, fix = T))
model1<-MCMCglmm(propfledged~1,random=~ID,nitt=100000,rcov=~trait:units,thin=10,burnin=1000,prior=prior1,data=dat,family="categorical",verbose=FALSE)
Based on my reading, I hold the residual variance at a fixed value to improve the running of the model in the binomial case. However, when I want to set up the bivariate, I don't know how to properly set up my priors when I have both a gaussian and binomial response.
I tried this for the bivariate but was told that V is the wrong dimension for some prior$G/prior$R elements:
prior2<-list(R=list(V=diag(2),nu=0.002), G=list(G1=list(V=diag(2), nu=0.002)))
bivmodel<-MCMCglmm(cbind(Rate_h,propfledged)~trait,
random=~us(trait):ID,
rcov=~idh(trait):units,
family=c("gaussian","categorical"),
nitt=100000,thin=10,burnin=1000,prior=prior2,data=dat,verbose=FALSE)
I also tried fixing the residual variance in the bivariate and come up with the same problem (V is the wrong dimension for some prior$G/prior$R elements):
prior3<-list(R = list(V = 0.5, nu = 0.002, fix = T), G=list(G1=list(V=diag(2), nu=0.002)))
bivmodel2<-MCMCglmm(cbind(Rate_h,propfledged)~trait,
random=~us(trait):ID,
rcov=~idh(trait):units,
family=c("gaussian","categorical"),
nitt=100000,thin=10,burnin=1000,prior=prior3,data=dat,verbose=FALSE)
How do I correctly specify my priors here?
Thank you for your time!
Cheers,
Alex Cones
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list