Skip to content

How to specify user-defined matrix Z?

5 messages · Ron Crump, Jacob Bergstedt, Zhengyang Zhou +1 more

#
Hi Zhengyang,
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.
#
Hi,

You can use the lmekin function in the coxme package.

Best regards,

Jacob
On 2017-09-29 12:28, Crump, Ron wrote:
#
Hi Ron,

Thank you for your reply. nlme can fit the model using:

group=rep(1,n)
fit_full = try(lme(y~-1+X, random=list(group=pdIdent(~-1+Z))))

I think it takes the Z to be the matrix of the random effects, and the group level is 1 for all observations. But I don't know how it works exactly.

I need to use lme4 because I want to test for the fixed effects (ie., beta), and the packages which can do it (eg, pbkrtest) is based on lme4.

Sincerely,
Zhengyang
#
Hi Jacob,

Thank you for your reply. I need to use lme4 because I want to test for the fixed effects (ie., beta), and the packages which can do it (eg, pbkrtest) is based on lme4.

Sincerely,
Zhengyang
#
I'm pretty sure lme4qtl can handle this:

https://www.biorxiv.org/content/early/2017/05/18/139816.1
https://github.com/variani/lme4qtl

Cheers,
Diogo

On Fri, Sep 29, 2017 at 4:51 PM, Zhengyang Zhou <
Zhengyang.Zhou at utsouthwestern.edu> wrote: