[R-sig-ME] MCMCglmm R-structure problem in heteroskedastic model

Jarrod Hadfield j.hadfield at ed.ac.uk
Thu Feb 3 11:45:39 CET 2011

Hi Paul,

On 3 Feb 2011, at 01:01, Paul Johnson wrote:

> Thanks very much for this Jarrod.
>> The work around is to add the phantom parents to mfs.fam, assigning  
>> them
>> anything for the fixed effects but having NA for the response.
>> It should then run as intended.
> Adding 2 phantom parents for every phenotyped parent (the unrelated  
> "founders") with NA response worked perfectly.
> Re your other suggestions...
>> When the number of missing records is large it can even be more  
>> efficient
>> (in terms of effective sample size per second) to do away with  
>> phantom parents
>> and use a denser inverse A (specify nodes="TIPS" in the call to  
>> MCMCglmm).
> This is very appealing, as the models have to be run for hours to  
> thin out the autocorrelation in the animal variance(s), but I  
> haven't managed to make it work. I don't understand it, or the  
> explanation of the nodes argument in ?MCMCglmm.

If you do not add the phantom parents to mfs.fam but specify   
nodes="TIPS", then MCMCglmm will use an inverse A equal in dimension  
to the number of individuals in mfs.fam rather than in the pedigree.  
However, if I understand your data there may be a better way (see  

> The pedigree looks like this:
>> pedigree
>        ID           DAM          SIRE
>   [1,] "Mother0001" NA           NA
> ...
> [1346,] "Mother1477" NA           NA
> [1347,] "Father0001" NA           NA
> ...
> [2692,] "Father1477" NA           NA
> [2693,] "0001"       "Mother0001" "Father0001"
> ...
> [4038,] "1477"       "Mother1477" "Father1477"
> Does doing away with phantom parents imply effectively using  
> na.omit(pedigree) in place of pedigree? I've tried this, with  
> nodes="TIPS", and get the error:
> Error in inverseA(pedigree, nodes = nodes, scale = scale) :
>  individuals appearing as dams but not in pedigree

The phantom parents need to be omitted from mfs.fam only, not the  
>> If some individuals in mfs.fam have not been phenotyped you can use  
>> prunePed
>> to remove useless individuals (make sure make.base=TRUE).
> Am I right in thinking that because each family is represented by  
> only 3 rows in the pedigree above (e.g. all the offspring in family  
> 1477 are represented by a single row, the last row), then there are  
> no useless individuals in my pedigree?

If the pedigree consists of nuclear families with no links connecting  
them then you are probably correct - the pedigree cannot be pruned.  
Have the parents been phenotyped, or  is it just the offspring?  If  
the latter, speed and mixing will be improved massively by doing a sib- 
anlaysis rather than an animal model.



> Thanks for your help,
> Paul
> The University of Glasgow, charity number SC004401

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

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