[R-sig-ME] Treatment:Block interactions in lme (Schabenberger & Pierce 2002)
Christoph Scherber
Christoph.Scherber at agr.uni-goettingen.de
Thu Nov 15 15:57:59 CET 2012
Dear all,
I have found the solution myself - it´s only possible using lmer and crossed random effects:
detach(package:nlme)
library(lme4)
farmdata$TRM=as.factor(farmdata$treatment)
farmdata$BL=as.factor(farmdata$block)
farmdata$FA=as.factor(farmdata$farm)
m2<-lmer(yield~TRM+
(1|FA/BL)+(1|FA/TRM),farmdata)
The results are exactly the same as in Schabenberger & Pierce (2002), output 7.8 (page 477).
Best wishes,
Christoph
(using R 2.15.1 on Windows 7 Professional 32-bit).
####
farm tx block yield
1 A 1 30.8601
1 A 2 30.3216
1 A 3 32.3135
1 B 1 33.3089
1 B 2 30.943
1 B 3 35.2381
2 A 1 31.3924
2 A 2 30.6227
2 A 3 29.9349
2 B 1 27.8756
2 B 2 25.2517
2 B 3 21.7799
3 A 1 39.216
3 A 2 38.9588
3 A 3 35.386
3 B 1 41.9458
3 B 2 43.3782
3 B 3 41.0985
4 A 1 37.1987
4 A 2 36.1024
4 A 3 35.8494
4 B 1 30.9673
4 B 2 32.5553
4 B 3 33.0424
5 A 1 24.9758
5 A 2 22.0432
5 A 3 22.9343
5 B 1 23.3903
5 B 2 24.5053
5 B 3 23.2413
6 A 1 28.059
6 A 2 27.9827
6 A 3 25.1334
6 B 1 28.6984
6 B 2 25.6783
6 B 3 25.8853
7 A 1 27.8232
7 A 2 25.3218
7 A 3 26.5197
7 B 1 37.2286
7 B 2 34.4472
7 B 3 32.4972
8 A 1 29.4101
8 A 2 26.6327
8 A 3 29.6004
8 B 1 30.9808
8 B 2 30.7152
8 B 3 30.6305
--
PD Dr Christoph Scherber
Georg-August University Goettingen
Department of Crop Science
Agroecology
Grisebachstrasse 6
D-37077 Goettingen
Germany
phone 0049 (0)551 39 8807
fax 0049 (0)551 39 8806
http://www.gwdg.de/~cscherb1
More information about the R-sig-mixed-models
mailing list