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 to fledging "propfledged"). I want to see whether the two responses covary at the among-individual level ("ID"). I am unsure how to properly specify my priors for the bivariate, particularly in whether to fixed the residual variance or not.
I am able to specify the priors and model correctly 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=10000,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)))
bivfledge<-MCMCglmm(cbind(Rate_h,propfledged)~trait,
random=~us(trait):ID,
rcov=~idh(trait):units,
family=c("gaussian","categorical"),
nitt=100000,thin=10,burnin=10000,prior=prior2,data=dat,verbose=FALSE)
I also tried fixing the residual variance and come up with the same problem:
prior3<-list(R = list(V = 0.5, nu = 0.002, fix = T),
G=list(G1=list(V=diag(2), nu=0.002)))
bivfledge<-MCMCglmm(cbind(Rate_h,propfledged)~trait,
random=~us(trait):ID,
rcov=~idh(trait):units,
family=c("gaussian","categorical"),
nitt=10000,thin=10,burnin=1000,prior=prior3,data=dat,verbose=FALSE)
How do I correctly specify my priors here?