[R] a question about linear mixed model in R

Chung Chang cc2240 at columbia.edu
Tue Jan 18 17:25:34 CET 2005


Dear all,

I have a somewhat unusual linear mixed model that I can't seem
to code in lme.  It's only unusual in that one random effect is
applied only to some of the observations (I have an indicator
variable
that specifies which observations have this random effect).

The model is:

X_hijk = alpha_h + h * b_i + r_(ij) + e_hijk , where

  h = 0 or 1 (indicator)
  i = 1, ..., N
  j = 1, ..., n_i
  k = 1, ..., K
alpha is fixed, and the rest are random.
I'm willing to assume b, r, and e are mutually independent
and normal with var(b) = sigma^2_b, var(r) = sigma^2_r, and
var(e) = sigma^2.

Any help in writing this model in lme() would be greatly
appreciated.

Thanks,

Chung Cheng




More information about the R-help mailing list