Skip to content
Back to formatted view

Raw Message

Message-ID: <8ef01ac9-639a-e003-b668-214e986902f6@control.lth.se>
Date: 2017-09-29T11:39:48Z
From: Jacob Bergstedt
Subject: How to specify user-defined matrix Z?
In-Reply-To: <a06aed92-6ce6-b9d6-6f23-c3a1ccf3b084@warwick.ac.uk>

Hi,

You can use the lmekin function in the coxme package.

Best regards,

Jacob


On 2017-09-29 12:28, Crump, Ron wrote:
> Hi Zhengyang,
>
>> In genetic studies, we sometimes include the genetic relatedness matrix as a variance component, so we have this following model:
>> Y~Xbeta+Zb+error,
>>
>> where beta are the fixed effects, b~N(0,sigma^2*I) are the random effects, error are the random error, Z is the cholesky decomposition of the known genetic relatedness matrix. So how to use lme4 to fit this model if we know X and Z beforehand? I can use the package "nlme" to do it using the code like
>>
>> lme(y~-1+X, random=list(group=pdIdent(~-1+Z))),
>> but how to do it using lme4?
> I think, assuming you are using I to indicate an identity matrix, that
> in neither case are you specifying a genetic relationship matrix, unless
> you are somehow incorporating it into Z (in which case I'd like to see how).
>
> I don't believe that either lme4 or nlme will allow you to do what you
> want. (Somebody might correct me on this).
>
> Within R you could certainly use MCMCglmm or INLA to do analysis of
> quantitative genetics data to obtain genetic parameters (or the asremlr
> interface to ASREML). I've not used it, but the pedigreemm package also
> looks like it would help you and there may be others. Outside of R,
> Karin Meyer's wombat program will also do the job.
>
>
> Regards,
> Ron.
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models