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
Specifying bivariate priors with different distributions in MCMCglmm
2 messages · Cones, Alexandra G., Jarrod Hadfield
2 days later
Hi, By specifying propfledged as ?categorical? you are treating each unique value of propfledged as a categorical variable. My guesses that this is not your intention. Binomial models should be of the form cbind(number_successes, number_failures)~ with family=?multinomial2?. The priors should then ?work? in the sense that they are of the right dimension. However, you shouldn?t fix the residual variance unless the binomial only has 1 trial (i.e. is Bernoulli). Cheers, Jarrod
On 6 Nov 2023, at 13:00, Cones, Alexandra G. <alex.cones at uky.edu> wrote:
propfledged The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. Is e buidheann carthannais a th? ann an Oilthigh Dh?n ?ideann, cl?raichte an Alba, ?ireamh cl?raidh SC005336.