specifying values in correlation matrix in nlme
Thanks a lot for your suggestion. I will try both way and see. Keyan
On Mon, 2005-05-30 at 10:32 +0100, I M S White wrote:
The only way I know of in nlme is to transform Zu to Z1 u1 so that
u1 ~ N(0, cI), which nlme can cope with. E.g. if A = PDP' is the
spectral decomposition of A, take Z1=ZPD^{1/2}, u1 = D^{-1/2}P'u.
Unfortunately Z1 is much less sparse than Z and in my experience
this only works with small problems.
The kinship package has a function lmekin which will do what you want. It
uses ML but I reckon it could be easily modified to use REML. It does not
make use of nlme, it just evaluates the log likelihood and passes it to a
general purpose optimiser.
On Thu, 26 May 2005, Keyan Zhao wrote:
Could anyone help with a linear mixed model fitting problem ? The model is : Y= Xp + Zu + e where X, Z are known design matrix, p is fixed effect factor, u is random effect, u~ (0, G) , e~(0,R) The main problem is , I want to fix the covariance matrix G to be a constant times a known covariance matrix A, G = c*A (c is positive constant, A is a predefined matrix with values manually set by me. I know the correlation option in lme function can specify some kind of correlation. but only with the Construct function defined, not whatever ever form I want. Any good ideas of how to do this in R ? Thanks a lot in advance, Keyan Zhao Computational Biology and Bioinformatics program Univ of Southern California Email: kzhao at usc.edu
====================================== I.White University of Edinburgh Ashworth Laboratories, West Mains Road Edinburgh EH9 3JT Tel: 0131 650 5490 Fax: 0131 650 6564 E-mail: iwhite at staffmail.ed.ac.uk ======================================