14 varieties have been tested in several environments (same year). In each location, we had 4 replications. The object Data gives the mean across the 4 rep. We also know the residual variance of each trial (last column)



A basic model could be :  lme(yield~variety, random=~1|trial, data=Data)



I would like to take into account the residual variances in the model (through the weights argument I suppose ... ?).

The problem is that I do not get the same results as the analysis on individual data (knowing each yield of each rep in each trial).



How can I write the new model ? May I use lme or lmer ?



Thanks



florent





Data <- structure(list(trial = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L,

1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,

2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,

3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,

4L), .Label = c("3", "4", "5", "7"), class = "factor"), variety = structure(c(1L,

7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 2L, 3L, 4L, 5L, 6L, 1L,

7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 2L, 3L, 4L, 5L, 6L, 1L,

7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 2L, 3L, 4L, 5L, 6L, 1L,

7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 2L, 3L, 4L, 5L, 6L), .Label = c("v1",

"v10", "v11", "v12", "v13", "v14", "v2", "v3", "v4", "v5", "v6",

"v7", "v8", "v9"), class = "factor"), yield = c(107.4706873,

103.030279, 92.09309183, 111.6526587, 111.6471084, 106.3951137,

100.7644581, 106.9474701, 111.4344368, 100.194633, 102.6678973,

104.023465, 114.2914664, 96.20112493, 90.66519691, 80.71405486,

75.92251853, 83.34543158, 89.65133707, 85.49293773, 84.36839561,

84.40894026, 90.33673044, 92.91185649, 88.42458061, 85.14326504,

85.87969755, 74.74880735, 95.39710822, 94.6043564, 82.32289202,

92.02095406, 100.0948826, 92.97126588, 95.91449336, 97.93312097,

96.80554501, 91.92658805, 89.62445504, 94.97347264, 103.2963091,

96.06916786, 91.29396262, 98.30729337, 85.95491755, 94.48762941,

94.73148043, 85.76638649, 88.12453162, 95.81735568, 99.17708407,

94.48107178, 93.33335943, 86.11982638, 97.62146063, 92.92838656

), rep = c(4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,

4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,

4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,

4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L), Res_var = c(26.383146,

26.383146, 26.383146, 26.383146, 26.383146, 26.383146, 26.383146,

26.383146, 26.383146, 26.383146, 26.383146, 26.383146, 26.383146,

26.383146, 30.164465, 30.164465, 30.164465, 30.164465, 30.164465,

30.164465, 30.164465, 30.164465, 30.164465, 30.164465, 30.164465,

30.164465, 30.164465, 30.164465, 82.169815, 82.169815, 82.169815,

82.169815, 82.169815, 82.169815, 82.169815, 82.169815, 82.169815,

82.169815, 82.169815, 82.169815, 82.169815, 82.169815, 94.424705,

94.424705, 94.424705, 94.424705, 94.424705, 94.424705, 94.424705,

94.424705, 94.424705, 94.424705, 94.424705, 94.424705, 94.424705,

94.424705)), .Names = c("trial", "variety", "yield", "rep", "Res_var"

), row.names = c(NA, -56L), class = "data.frame")


	[[alternative HTML version deleted]]

