[R-sig-ME] incorporate pedigree into lmer

Simon Blomberg blomsp at ozemail.com.au
Wed Feb 7 00:05:35 CET 2007


No,

The animal model requires specification of the variance-covariance 
matrix of the random effects, according to the pedigree (kinship) 
information. lmer and lmer2 currently do not allow this, as far as I 
know. (There is the pedigree constructor function in package lme4, as 
you noticed, so presumably this functionality is on the way.) You could 
perhaps use lme (package nlme) to fit the model, but specifying the 
var-covar matrix for such complex data will be painful. There is lmekin 
in the kinship package, which may be more useful to you. However, I 
haven't used it so I can't be of further help. I don't know how to 
estimate separate additive and dominance matrices. Maybe someone more 
experienced than me will reply.

I think there is a need for a quantitative genetics package for R, 
although some qtl mapping methods seem to be implemented (See the 
Genetics task view on CRAN). So much statistics, so little time. *sigh*

Simon.

There is Doran, Harold wrote:
> Well, I'm still guessing at what you want as a fixed effect and what will be random, but here is a shot
> 
> (fm1 <- lmer(weight ~ 1 +(1|Sire) + (1|Dam), data))
> 
>  
> 
>> -----Original Message-----
>> From: Jon Hallander [mailto:Jon.Hallander at genfys.slu.se] 
>> Sent: Tuesday, February 06, 2007 8:26 AM
>> To: Doran, Harold; r-sig-mixed-models at r-project.org
>> Subject: RE: [R-sig-ME] incorporate pedigree into lmer
>>
>> Oh, sorry for being unclear. I am using a mixed linear model 
>> including both random and fixed effects:
>> y = Xb + Za + e
>> where the vector y are observed individual data, b is a 
>> vector of fixed effects, a is an individual additive random 
>> effect that are normally distributed vectors with 
>> (co)variance A*var(a). X and Z are incidence matrices 
>> relating the fixed and random effects (b and a) with the 
>> observations y. Furthermore, e is the error term, w normally 
>> distributed with mean zero and variance var(e). A is the 
>> additive genetic relationship matrix which is computed using 
>> the pedigree information (given below). A typical data might 
>> look like this:
>> Id Sire Dam y (i.e. weight in kg)
>> 1  Na   Na  4.3 	
>> 2  Na   Na  4.7
>> 3  1    2   4.4
>> 4  1    Na  4.1 
>> 5  4    2   4.3
>> 6  4    2   4.2
>>
>> Thanks for the help. 
>>
>> Best regards,
>> Jon
>>
>> -----Original Message-----
>> From: r-sig-mixed-models-bounces at r-project.org 
>> [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf 
>> Of Doran, Harold
>> Sent: den 6 februari 2007 13:51
>> To: Jon Hallander; r-sig-mixed-models at r-project.org
>> Subject: Re: [R-sig-ME] incorporate pedigree into lmer
>>
>> Jon
>>
>> I think you will find the members of this list helpful, but 
>> you have given zero information that we can use to help you 
>> with your problem. Please provide a representation of your 
>> model and a description of your data. Or better yet, some 
>> sample data. I don't have any idea what an "animal model" is 
>> (maybe others do), but if you can provide a statistical 
>> representation, maybe we can walk you through this.
>>
>> Harold 
>>
>>> -----Original Message-----
>>> From: r-sig-mixed-models-bounces at r-project.org
>>> [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Jon 
>>> Hallander
>>> Sent: Tuesday, February 06, 2007 7:07 AM
>>> To: r-sig-mixed-models at r-project.org
>>> Subject: [R-sig-ME] incorporate pedigree into lmer
>>>
>>> Hello,
>>>
>>> I am a novice using the lme4 library and would like some help 
>>> regarding the function lmer. I would like to solve the animal model 
>>> using several random effects (e.g. individual (animal) and 
>> dominance 
>>> effects). Also, I would like to infer the additive and dominance 
>>> relationship matrices (covariance matrices). The function 
>> pedigree can 
>>> set up the pedigree structure, but how do I use it in the lmer 
>>> function? I have not found any convenient example.
>>> Thanks in advance.
>>>
>>> Best regards,
>>> Jon Hallander
>>>
>>> ____________________________________________
>>>
>>> Jon Hallander
>>> Department of Forest Genetics and Plant Physiology Swedish 
>> University 
>>> of Agricultural Sciences
>>> SE-901 83 UMEÅ
>>> SWEDEN
>>> Phone: +46 90 786 82 80
>>> Mobile: +46 70 220 08 79
>>> Fax: +46 90 786 81 65
>>> E-mail: jon.hallander at genfys.slu.se
>>> ____________________________________________
>>> ###########################################
>>>
>>> This message has been scanned by F-Secure Anti-Virus for 
>>> Mic...{{dropped}}
>>>
>>> _______________________________________________
>>> R-sig-mixed-models at r-project.org mailing list 
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list 
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>> ###########################################
>>
>> This message has been scanned by F-Secure Anti-Virus for 
>> Microsoft Exchange.
>> For more information, connect to http://www.f-secure.com/
>>
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> 


-- 
Simon Blomberg, B.Sc.(Hons.), Ph.D, M.App.Stat.
Centre for Resource and Environmental Studies
The Australian National University
Canberra ACT 0200
Australia
T: +61 2 6125 7800 email: Simon.Blomberg_at_anu.edu.au
F: +61 2 6125 0757
CRICOS Provider # 00120C

The combination of some data and an aching desire for
an answer does not ensure that a reasonable answer
can be extracted from a given body of data.
- John Tukey.




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