[R-sig-ME] random effects with covariance matrix depending on a group characteristic

Gabriel Baud-Bovy baud-bovy.gabriel at hsr.it
Wed Mar 27 22:25:12 CET 2013


Dear all,

I am trying to define a new covariance structure  for the random effects 
in lme
but I don't know if it is possible.

Let's assume that I have always two experimental units S (j=1,2) nested
inside a grouping variable G (n groups, i=1,..,n) and a third factor D that
takes the value  1 or 2 depending on some group-level characteristic.

For example,D=1 for group 1 and 3 and D=2 for group 2:

G    A    D    Y
1    1    1    y_11
1    2    1    y_12
2    1    2    y_21
2    2    2 y_22
3    1    1    y_31
3    2    1    y_32

I would like to define the following mixed-effect model

y_ij = mu  + a_ij  + e_ij

where y_ij is the observation for on unit j in group i, mu is the intercept,
a_ij the random effect and e_ij the residuals. The random effect a_ij 
must have
a covariance structure that dependson the variable D

1. random effects between two different groups are not correlated:
cov([bi1 bi'2]) = 0        if i != i'

2. correlation between the experimental units inside each group
depend on the group characteristic D:
cov([bi1 bi2])  = var_A*P  if D_i = 1
cov([bi1 bi2])  = var_A*Q  if D_i = 2

where P and Q are two different 2x2 correlation matrices with fixed 
coefficients.
Note that only the correlation pattern change, not the variance var_A.

The covariance structure for the residuals is standard

cov(e) = sigma2*diag(n)


I know that I have to define a new pdMat class but I have two questions:

1) how to speficify the model? This is how I would do it if the covariance
matrix did not depend on the group characteristic D:

lme(Y ~ 1 , random = list(G=pdNew(~A)), data )

but I don't know how to make it depend on group characteristic D.
Is it possible and how would you specify the dependency of D?

2) what is the unconstrained matrix-logarithm parametrization for
acovariance matrix sigma2*A where M is a fixed pattern?

Is the solution simply log(sigma2*A) = log(sigma2) + log(A) with
log(A) = Ulog(L)U' where ULU is the eigenvalue decomposition?


Thank you,

Gabriel


-- 
---------------------------------------------------------------------
Gabriel Baud-Bovy                     email:gabriel.baud-bovy at iit.it  
RBCS, Italian Institute of Technology     tel.: (+39) 010 71781 (822)
via Morego 30, 16163 Genovahttp://www.iit.it



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