[R] lmer random effect model matrix question

Mark Lyman mlyman at byu.edu
Thu Sep 29 19:14:34 CEST 2005


I have one fixed effect, sor, with two levels. I have eight lots and 
three wafers from each lot. I have included the data below.

I would like to fit a mixed model that estimates a covariance parameter 
for wafer, which is nested in lot, and two covariance parameters for 
lot, one for each level of sor. The following command fits the model 
that I want, except for it estimates the correlation between the two 
covariance parameters for lot. Is there anyway to make R not estimate 
this correlation? Thank you.

lmer(y~sor+(sor-1|lot)+(1|wafer:lot),wafer)

For those familiar with proc mixed the following SAS code fits the model 
that I want:

proc mixed scoring=4;
   class sor lot wafer site;
   model y= sor/ddfm=satterth;
   random lot(sor)/group=sor;
   random wafer(lot);
run;

   sor lot wafer site    y
1    1   1     1    1 2006
2    1   1     1    2 1999
3    1   1     1    3 2007
4    1   1     2    1 1980
5    1   1     2    2 1988
6    1   1     2    3 1982
7    1   1     3    1 2000
8    1   1     3    2 1998
9    1   1     3    3 2007
10   1   2     1    1 1991
11   1   2     1    2 1990
12   1   2     1    3 1988
13   1   2     2    1 1987
14   1   2     2    2 1989
15   1   2     2    3 1988
16   1   2     3    1 1985
17   1   2     3    2 1983
18   1   2     3    3 1989
19   1   3     1    1 2000
20   1   3     1    2 2004
21   1   3     1    3 2004
22   1   3     2    1 2001
23   1   3     2    2 1996
24   1   3     2    3 2004
25   1   3     3    1 1999
26   1   3     3    2 2000
27   1   3     3    3 2002
28   1   4     1    1 1997
29   1   4     1    2 1994
30   1   4     1    3 1996
31   1   4     2    1 1996
32   1   4     2    2 2000
33   1   4     2    3 2002
34   1   4     3    1 1987
35   1   4     3    2 1990
36   1   4     3    3 1995
37   2   5     1    1 2013
38   2   5     1    2 2004
39   2   5     1    3 2009
40   2   5     2    1 2023
41   2   5     2    2 2018
42   2   5     2    3 2010
43   2   5     3    1 2020
44   2   5     3    2 2023
45   2   5     3    3 2015
46   2   6     1    1 2032
47   2   6     1    2 2036
48   2   6     1    3 2030
49   2   6     2    1 2018
50   2   6     2    2 2022
51   2   6     2    3 2026
52   2   6     3    1 2009
53   2   6     3    2 2010
54   2   6     3    3 2011
55   2   7     1    1 1984
56   2   7     1    2 1993
57   2   7     1    3 1993
58   2   7     2    1 1992
59   2   7     2    2 1992
60   2   7     2    3 1990
61   2   7     3    1 1996
62   2   7     3    2 1993
63   2   7     3    3 1987
64   2   8     1    1 1996
65   2   8     1    2 1989
66   2   8     1    3 1996
67   2   8     2    1 1997
68   2   8     2    2 1993
69   2   8     2    3 1996
70   2   8     3    1 1990
71   2   8     3    2 1989
72   2   8     3    3 1992




More information about the R-help mailing list