[R-sig-ME] various priors for MCMCglmm

Ned Dochtermann ned.dochtermann at gmail.com
Mon May 23 20:11:07 CEST 2011

So in going back over some of this it is clear that my understanding of nu
is still very much lacking, making the multivariate generalizations perhaps
inappropriate. Part of this seems to be that nu incorporates both "degree of
belief" and some aspects of the shape of the prior distribution, at least
for the inverse gamma.

Can anyone recommend some general texts that might clarify some of this?
Gelman and Hill (2006) seem to leave a lot of this out--at least based on my
skimming through it looking for discussion of priors.


-----Original Message-----
From: Ned Dochtermann [mailto:ned.dochtermann at gmail.com] 
Sent: Friday, May 20, 2011 5:44 PM
To: 'r-sig-mixed-models at r-project.org'
Subject: various priors for MCMCglmm

Hi all,

I have had and continue to have a lot of difficulty with not only the
concept of priors but also their implementation for the MCMCglmm package.
While Jarrod has always been extraordinarily helpful with this--as well as
patient with those of us that seem eternally dense--I thought I'd list out
some of the specifications I've come across to perhaps ease the frequency
with which Jarrod has to reply to questions about priors.

I've specified, for ease, R=G and a single random effect. From things I've
read R is less sensitive to prior specification so this might be okay (?).
Since I'm still not comfortable with priors hopefully these can be clarified
by those more knowledgeable. I'm sure it would also be of general use if
other priors were added via replies.

The parts that are correct should be attributed to Jarrod. The parts that
are wrong should be attributed to my clumsy attempts to generalize something
he wrote. Some of this is just copied from posts to the listserv or Jarrod's
course notes but I thought it might be useful to summarize then in a single

Hopefully none of this is too misleading but will be of some use to others.


Ned Dochtermann
Department of Biology
University of Nevada, Reno

ned.dochtermann at gmail.com

#Inverse Wishart (univariate)

	prior.iw<-list(R=list(V=1, nu=1),G=list(G1=list(V=1, nu=1))) 

#Inverse Wishart (multivariate, variables=x)

	prior.miw<-list(R=list(V=diag(x), nu=x),G=list(G1=list(V=diag(x),
#it came up in discussion that this prior can substantially affect the
posterior when there are few data

#I think that the following is an inverse Wishart for multiple response
variables that is less informative is:

	prior.miw<-list(R=list(V=diag(x), nu=x, alpha.mu=c(0,0),
alpha.V=diag(x)*a),G=list(G1=list(V=diag(x), nu=x, alpha.mu=c(0,0),

#for this a should be "something large (e.g. 1000, depending on the scale of
the data)"

#Inverse Gamma (univariate)

	prior.ig<-list(R=list(V=1, nu=0.002),G=list(G1=list(V=1, nu=0.002)))

#Inverse Gamma (multivariate, two variables)

nu=1.002),G=list(G1=list(V=diag(2), nu=1.002))) 

#Inverse Gamma (multivariate, variables=x)

nu=1.002),G=list(G1=list(V=diag(x), nu=1.002)))


nu=b.002),G=list(G1=list(V=diag(x), nu=b.002)))
#where b is x-1

#I initially thought the first of these was the way to go but I'm less so
now after looking at the 
#univariate specification. Also, Gelman (2006. Bayesian Analysis.
1(3):515-533) suggests that
#there can be problems with this prior.

#flat covariance between two responses 

nu=3),G=list(G1=list(V=diag(2)*1e-6, nu=3)))
#to generalize this to x variables V would be diag(x) but I'm not sure if nu
would be x+1

#flat, uniform, prior for just a variance

	prior.flatvar<-list(R=list(V=1e-16, nu=-2),G=list(G1=list(V=1e-16,

#another flat improper prior, equivalent to REML fitting:

	prior.reml<-list(G=list(G1=list(V=1,nu=0)),R = list(V =1, nu = ))

#I've actually run the same univariate analysis with prior.reml and lmer and
gotten pretty much the same results

More information about the R-sig-mixed-models mailing list