# [R] random effects with lmer() and lme(), three random factors

Date: Sat 29 Jul 2006 - 09:58:00 EST

4 samples were randomly chosen from a large pool of test samples. Each of the 4 samples was analyzed by 4 operators, randomly selected from a group of operators. Each operator independently analyzed same samples over 5 runs (runs nested in operator). I would like to know the following things:

With this data, I assumed the three factors are all random effects. So the model I am looking for is

1. using lme:

gx <- groupedData(y ~ 1 | Sample, data=x)

then I run the lme

pdIdent(~Operator-1),

pdIdent(~Operator:Run-1)))))

finally, I use VarCorr to extract the variance components

vc <- VarCorr(fm)

```                     Variance           StdDev

```

Operator:Run 1.595713e-10:20 1.263215e-05:20

Sample 5.035235e+00: 4 2.243933e+00: 4

Operator 5.483145e-04: 4 2.341612e-02: 4

Residuals 8.543601e-02: 1 2.922944e-01: 1

(1|Operator:Run), data=x)

summary(fm)

Formula: H.I.Index ~ (1 | Sample.Name) + (1 | Operator) + (1 | Operator:Run)

Data: x

AIC BIC logLik MLdeviance REMLdeviance

96.73522 109.0108 -44.36761 90.80064 88.73522

Random effects:

Operator:Run (Intercept) 4.2718e-11 6.5359e-06

Operator (Intercept) 5.4821e-04 2.3414e-02

Sample (Intercept) 5.0352e+00 2.2439e+00

``` Residual                 8.5436e-02 2.9229e-01

```

number of obs: 159, groups: Operator:Run, 20; Operator, 4; Sample.Name, 4

There is a difference between lmer and lme is for the factor Operator:Run. I cannot find where the problem is. Could anyone point me out if my model specification is correct for the problem I am dealing with. I am pretty new user to lme and lmer. Thanks for your help!

Wilson Wang

[[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat Jul 29 10:02:43 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 29 Jul 2006 - 12:16:41 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.