# [R-sig-ME] MCMCglmm and prior specification

Christopher David Desjardins desja004 at umn.edu
Tue Nov 24 17:59:03 CET 2009

```Hi Cristina,
I'm sure Jarrod or someone else more knowledgeable will address this but
your random variables are highly susceptible to changes in the prior
unless you have an extremely large sample size. One thing that is worth
noting is that your credible intervals overlap regardless of priors,
however, that difference below seems like it could be pretty high. Is
it? What's the mean and variance of Length? If the variance is large
than maybe this difference isn't that big and this difference based on
priors is moot.

One prior worth trying is the inverse gamma prior.

prior=list(R=list(V=1, nu=0.002),
G=list(G1=list(V=1, nu=0.002),
G2=list(V=1, nu=0.002),
G3=list(V=1, nu=0.002)))

I guess this used to be the default prior in WinBUGS. But this will just
give you another estimate.

On 11/24/2009 10:42 AM, ledonret at email.unc.edu wrote:
> Dear all,
>
> I am trying to use the MCMCglmm package to create credibility
> intervals for random variables in my data. I'm having a bit of trouble
> though determining what the best prior to use for each model is, since
> the results seem to differ tremendously depending on which prior I am
> using, for instance, I've tried these three types of priors,
>
>> halfFam<-var(data\$Family)/2
>> prior1=list(R=list(V=1,n=1,fix=1),G=list(G1=list(V=1,n=1),G2=list(V=1,n=1)))
>>
>> prior2=list(R=list(V=1,n=1),G=list(G1=list(V=1,n=1),G2=list(V=1,n=1)))
>> prior3=list(R=list(V=halfFam,n=1),G=list(G1=list(V=halfFam,n=1),G2=list(V=halfFam,n=1)))
>>
One thing you could try is setting nu to a smaller value to make it less
informative.

Chris

> For the model,
>> model<-MCMCglmm(Length~1,random=~Family+Rep,data=data,verbose=FALSE,prior=prior,burnin=10000,nitt=75000)
>>
>
> Where the random factors are Family and Replicate.
> From these priors, I get intervals for my Family effect,
>
>> HPDinterval(model1\$VCV[,"Family"])
>          lower     upper
> var1 0.09660338 0.8888039
>
>> HPDinterval(model2\$VCV[,"Family"])
>         lower    upper
> var1 0.1944570 2.120540
>
>> HPDinterval(model3\$VCV[,"Family"])
>         lower    upper
> var1 0.2099238 1.529794
>
>
> I feel bad that I don't understand better how to specify the
> components of these priors, but from what I understand, the model
> should return similar values even if the priors are very different.
> I've looked through the vignette thoroughly, but didn't get a sense of
> what I was supposed to do if alternate priors returned different
> answers. I'm not sure whether this is telling me that all the
> information is coming from my priors (and there is, in fact, no
> information in the data), or I am just incorrectly specifying my priors.
>
> Any insight would be very much appreciated! Happy holidays,
>
> Cristina Ledon-Rettig
> UNC-Chapel Hill
>
> *I am using lme4 version 0.99375-28 with Mac OS X version 10.5
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

--
Christopher David Desjardins, Ph.D. Student
Quantitative Methods in Education
Department of Educational Psychology
University of Minnesota
http://cddesjardins.wordpress.com/

```