[R-sig-ME] Priors for MCMCglmm with haplodiploid relatedness matrix

Michael Sheehan msheehan at cornell.edu
Wed Oct 5 16:54:20 CEST 2016

Matthew and Jared,

Many thanks for the replies. Using nadiv's makeS function I was able to run the model, so it seems that it was a problem with the code that I had been using to generate the pedigree.

At the very least let this thread stand as an advertisement for the makeS function in nadiv for aiding haplodiploid animal models!



From: Matthew Wolak <s06mw3 at abdn.ac.uk>
Sent: Wednesday, October 5, 2016 6:56:26 AM
To: Michael Sheehan; r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] Priors for MCMCglmm with haplodiploid relatedness matrix

Hi Mike,

As Jarrod suggests, the singularity could be due to a numerical
dependence among entries in the matrix that could arise either because
of the structure of the pedigree or because of (more or less) rounding
errors. Have you/can you compare your haplo.mat.inverse to what you get
if you run the pedigree through the `makeS()` function in the nadiv
package? Does supplying the makeS inverse matrix allow the model to run?

For example, using the `FG90` example pedigree in nadiv:

nadiv.haplo.mat.inverse <- makeS(FG90, heterogametic = "0", DosageComp =

# Where the `heterogametic` argument gives the code in a 4th column of
the pedigree denoting the haploid sex


Dr. Matthew E. Wolak
School of Biological Sciences
Zoology Building
University of Aberdeen
Tillydrone Avenue
Aberdeen AB24 2TZ

Zoology room 202
office phone: +44 (0)1224 273255

On 04/10/16 17:00, Michael Sheehan wrote:
> Dear all,
> I am attempting to examine the heritability of a number of traits in a haplodiplod species using MCMCglmm. This has presented a number of challenges since the standard relatedness matrix calculated from a pedigree as part of the program assumes diploid relatedness, which underestimates relatedness among sisters. I have been able to make a haplodiploid appropriate relatedness matrix but when I run the following:
> model1=MCglmm(trait~1, random=~animal, ginverse=list(animal=haplo.mat.inverse), data?ta, family="ordinal", prior=prior1, nitt5000, thin0, burninP00, verbose=T)
> I immediately get the following error:
> "G-structure 1 is ill-conditioned (possibly because of ginverse): use proper priors if you haven't, or rescale data if you have"
> If I run the same code with a diploid relatedness matrix (calling it through pedigree or ginverse) the program runs without error. I have tried a wide range of priors and even run without priors and get the same error for the haplodiploid matrix while the diploid matrix runs.
> I am curious if others have received a similar message and how it was dealt with.
> Thanks in advance for any help!
> Mike Sheehan
>       [[alternative HTML version deleted]]

The University of Aberdeen is a charity registered in Scotland, No SC013683.
Tha Oilthigh Obar Dheathain na charthannas cl?raichte ann an Alba, ?ir. SC013683.

	[[alternative HTML version deleted]]

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