-
emmeans (mod_alpha1, ~ gen)
+
emmeans (mod_alpha1, ~ gen)
gen emmean SE df lower.CL upper.CL
G01 5.11 0.276 2 3.92 6.30
@@ -1414,13 +1128,19 @@
+
+
+John, JA, and ER Williams. 1995.
Cyclic and Computer Generated Designs . 2nd ed. New York: Chapman; Hall/CRC Press.
https://doi.org/10.1201/b15075 .
+
+
+Patterson, H. D., and E. R. Williams. 1976.
“A New Class of Resolvable Incomplete Block Designs .” Biometrika 63 (1): 83–92.
https://doi.org/10.2307/2335087 .
+
+
+Yates, F. 1936. “A New Method of Arranging Variety Trials Involving a Large Number of Varieties.” J Agric Sci 26: 424–55.
+
+
-
diff --git a/chapters/incomplete-block-design_files/figure-html/fig-rcbd_hist-1.png b/chapters/incomplete-block-design_files/figure-html/fig-rcbd_hist-1.png
deleted file mode 100644
index 62c160b..0000000
Binary files a/chapters/incomplete-block-design_files/figure-html/fig-rcbd_hist-1.png and /dev/null differ
diff --git a/chapters/incomplete-block-design_files/figure-html/lattice_design-1.png b/chapters/incomplete-block-design_files/figure-html/lattice_design-1.png
deleted file mode 100644
index 475d61f..0000000
Binary files a/chapters/incomplete-block-design_files/figure-html/lattice_design-1.png and /dev/null differ
diff --git a/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-16-1.png b/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-14-1.png
similarity index 100%
rename from chapters/incomplete-block-design_files/figure-html/unnamed-chunk-16-1.png
rename to chapters/incomplete-block-design_files/figure-html/unnamed-chunk-14-1.png
diff --git a/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-23-1.png b/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-23-1.png
index 8899fa9..7fb5971 100644
Binary files a/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-23-1.png and b/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-23-1.png differ
diff --git a/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-24-1.png b/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-24-1.png
deleted file mode 100644
index 475d61f..0000000
Binary files a/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-24-1.png and /dev/null differ
diff --git a/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-46-1.png b/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-31-1.png
similarity index 100%
rename from chapters/incomplete-block-design_files/figure-html/unnamed-chunk-46-1.png
rename to chapters/incomplete-block-design_files/figure-html/unnamed-chunk-31-1.png
diff --git a/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-32-1.png b/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-32-1.png
index 7f38d13..0f7cdf6 100644
Binary files a/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-32-1.png and b/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-32-1.png differ
diff --git a/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-38-1.png b/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-38-1.png
deleted file mode 100644
index 7fb5971..0000000
Binary files a/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-38-1.png and /dev/null differ
diff --git a/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-47-1.png b/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-47-1.png
deleted file mode 100644
index 0f7cdf6..0000000
Binary files a/chapters/incomplete-block-design_files/figure-html/unnamed-chunk-47-1.png and /dev/null differ
diff --git a/references.html b/references.html
index a380d6c..4a77318 100644
--- a/references.html
+++ b/references.html
@@ -294,6 +294,11 @@ References
Hartig, Florian. 2022. DHARMa: Residual Diagnostics for Hierarchical
(Multi-Level / Mixed) Regression Models . https://CRAN.R-project.org/package=DHARMa .
+
+John, JA, and ER Williams. 1995.
Cyclic and Computer
+Generated Designs . 2nd ed. New York:
+Chapman; Hall/CRC Press.
https://doi.org/10.1201/b15075 .
+
Kuznetsova, Alexandra, Per B. Brockhoff, and Rune H. B. Christensen.
2017.
“lmerTest Package: Tests in
@@ -318,6 +323,11 @@ References
Pinheiro, José, Douglas Bates, and R Core Team. 2023. Nlme: Linear
and Nonlinear Mixed Effects Models . https://CRAN.R-project.org/package=nlme .
+
+Yates, F. 1936. “A New Method of Arranging Variety Trials
+Involving a Large Number of Varieties.” J Agric Sci 26:
+424–55.
+
diff --git a/search.json b/search.json
index 2974787..ae01b0a 100644
--- a/search.json
+++ b/search.json
@@ -236,7 +236,7 @@
"href": "chapters/incomplete-block-design.html",
"title": "9 Incomplete Block Design",
"section": "",
- "text": "9.1 Background\nThe block design described in Chapter 4 was complete, meaning that each block contained each treatment level at least once. In practice, it may not be possible or advisable to include all treatments in each block, either due to limitations in treatment availability (e.g. limited seed stocks) or the block size becomes too large to serve its original goals of controlling for spatial variation.\nIn such cases, (randomized) incomplete block designs (IBD) can be used. Incomplete block designs break the experiment into many smaller blocks than RCBD and assigns a subset of the treatment levels to each incomplete block. There are several different approaches for how to assign treatment levels to incomplete blocks and these designs impact the final statistical analysis (and if all treatments included in the experimental design are estimable). An excellent description of incomplete block design is provided in ANOVA and Mixed Models by Lukas Meier.\nIncomplete block designs are grouped into two groups: (1) balanced lattice designs; and (2) partially balanced (also called alpha-lattice) designs.\nTo avoid having a disconnected design, a balanced incomplete block design can be used\nThe statistical model for balanced incomplete block design is:\n\\[y_{ij} = \\mu + \\alpha_i + \\beta_j + \\epsilon_{ij}\\]\nWhere:\n\\(\\mu\\) = overall experimental mean\n\\(\\alpha\\) = treatment effects (fixed)\n\\(\\beta\\) = block effects (random)\n\\(\\epsilon\\) = error terms\n\\[ \\epsilon \\sim N(0, \\sigma)\\]\n\\[ \\beta \\sim N(0, \\sigma_b)\\] There are few key points that we need to keep in mind while designing incomplete block designs:\nThe balanced incomplete block designs are guided by strict principles and guidelines including: the number of treatments must be a perfect square (e.g. 25, 36, and so on); number of replicates must be equal to no. of blocks +1;",
+ "text": "9.1 Background\nThe block design described in Chapter 4 was complete, meaning that each block contained each treatment level at least once. In practice, it may not be possible or advisable to include all treatments in each block, either due to limitations in treatment availability (e.g. limited seed stocks) or the block size becomes too large to serve its original goals of controlling for spatial variation.\nIn such cases, incomplete block designs (IBD) can be used. Incomplete block designs break the experiment into many smaller incomplete blocks that are nested within standard RCBD-style blocks and assigns a subset of the treatment levels to each incomplete block. There are several different approaches Patterson and Williams (1976) for how to assign treatment levels to incomplete blocks and these designs impact the final statistical analysis (and if all treatments included in the experimental design are estimable). An excellent description of incomplete block design is provided in ANOVA and Mixed Models by Lukas Meier.\nIncomplete block designs are grouped into two groups: (1) balanced lattice designs; and (2) partially balanced (also commonly called alpha-lattice) designs. Balanced IBD designs have been previously called “lattice designs” [need refs], but we are not using that term to avoid confusion with alpha-lattice designs, a term that is commonly used.\nIn alpha-lattice design, the blocks are grouped into complete replicates. These designs are also termed as “resolvable incomplete block designs” or “partially balanced incomplete block designs” (paterson?). This design has been more commonly used instead of balanced IBD because of it’s practicability, flexibility, and versatility.\nTo avoid having a disconnected design, a balanced incomplete block design can be used.",
"crumbs": [
"Experiment designs",
"
9 Incomplete Block Design "
@@ -247,51 +247,18 @@
"href": "chapters/incomplete-block-design.html#background",
"title": "9 Incomplete Block Design",
"section": "",
- "text": "A drawback of this design is that block effect and treatment effects are confounded.\nTo remove the block effects, it is better compare treatments within a block.\nNo treatment should appear twice in any block as it contributes nothing to within block comparisons.\n\n\n\n\n\n\n\n\nA note\n\n\n\nBecause the blocks are incomplete, the Type I and Type III sums of squares will be different. That is, the missing treatments in each block represent missing observations (but not missing ‘at random’).",
+ "text": "9.1.1 Statistical Model\nThe statistical model for a balanced incomplete block design is:\n\\[y_{ij} = \\mu + \\alpha_i + \\beta_j + \\epsilon_{ij}\\]\nWhere:\n\\(\\mu\\) = overall experimental mean\n\\(\\alpha\\) = treatment effects (fixed)\n\\(\\beta\\) = block effects (random)\n\\(\\epsilon\\) = error terms\n\\[ \\epsilon \\sim N(0, \\sigma)\\]\n\\[ \\beta \\sim N(0, \\sigma_b)\\]\nThere are few key points that we need to keep in mind while designing incomplete block experiments:\n\nA drawback of this design is that block effect and treatment effects are confounded.\nTo remove the block effects, it is better compare treatments within a block.\nNo treatment should appear twice in any block as it contributes nothing to within block comparisons.\n\nThe balanced incomplete block designs are guided by strict principles and guidelines including: the number of treatments must be a perfect square (e.g. 25, 36, and so on), and number of replicates must be equal to number of blocks +1.\n\n\n\n\n\n\nNote on Sums of Squares\n\n\n\nBecause the blocks are incomplete, the Type I and Type III sums of squares will be different even when there is no missing data from a trail. That is because the missing treatments in each block represent missing observations (even though they are not missing ‘at random’).",
"crumbs": [
"Experiment designs",
"
9 Incomplete Block Design "
]
},
{
- "objectID": "chapters/incomplete-block-design.html#balanced-incomplete-block-design",
- "href": "chapters/incomplete-block-design.html#balanced-incomplete-block-design",
+ "objectID": "chapters/incomplete-block-design.html#examples-analyses",
+ "href": "chapters/incomplete-block-design.html#examples-analyses",
"title": "9 Incomplete Block Design",
- "section": "9.2 Balanced Incomplete Block Design",
- "text": "9.2 Balanced Incomplete Block Design\n\n9.2.1 Example Analysis\nWe will demonstrate an example data set designed in a balanced incomplete block design. First, load the libraries required for analysis and estimation.\n\nlme4nlme\n\n\n\nlibrary(lme4); library(lmerTest); library(emmeans)\nlibrary(dplyr); library(broom.mixed); library(performance)\n\n\n\n\nlibrary(nlme); library(broom.mixed); library(emmeans)\nlibrary(dplyr); library(performance)\n\n\n\n\nThe data used for this example analysis was extracted from the agridat package. This example is comprised of soybean balanced incomplete block experiment.\n\ndat <- agridat::weiss.incblock\n\n\nTable of variables in the data set\n\n\nblock\nblocking unit\n\n\ngen\ngenotype (variety) factor\n\n\nrow\nrow position for each plot\n\n\ncol\ncolumn position for each plot\n\n\nyield\ngrain yield in bu/ac\n\n\n\n\n\n\n\n\n\n\n\n\n\n9.2.1.1 Data integrity checks\nWe will start inspecting the data set firstly by looking at the class of variables:\n\nstr(dat)\n\n'data.frame': 186 obs. of 5 variables:\n $ block: Factor w/ 31 levels \"B01\",\"B02\",\"B03\",..: 1 2 3 4 5 6 7 8 9 10 ...\n $ gen : Factor w/ 31 levels \"G01\",\"G02\",\"G03\",..: 24 15 20 18 20 5 22 1 9 14 ...\n $ yield: num 29.8 24.2 30.5 20 35.2 25 23.6 23.6 29.3 25.5 ...\n $ row : int 42 36 30 24 18 12 6 42 36 30 ...\n $ col : int 1 1 1 1 1 1 1 2 2 2 ...\n\n\nThe variables we need for the model are block, gen and yield. The block and gen are classified as factor variables and yield is numeric. Therefore, we don’t need to change class of any of the required variables.\nNext, let’s check the independent variables. We can look at this by running a cross tabulations among block and gen factors.\n\nagg_tbl <- dat %>% group_by(gen) %>% \n summarise(total_count=n(),\n .groups = 'drop')\nagg_tbl\n\n# A tibble: 31 × 2\n gen total_count\n <fct> <int>\n 1 G01 6\n 2 G02 6\n 3 G03 6\n 4 G04 6\n 5 G05 6\n 6 G06 6\n 7 G07 6\n 8 G08 6\n 9 G09 6\n10 G10 6\n# ℹ 21 more rows\n\n\n\nagg_df <- aggregate(dat$gen, by=list(dat$block), FUN=length)\nagg_df\n\n Group.1 x\n1 B01 6\n2 B02 6\n3 B03 6\n4 B04 6\n5 B05 6\n6 B06 6\n7 B07 6\n8 B08 6\n9 B09 6\n10 B10 6\n11 B11 6\n12 B12 6\n13 B13 6\n14 B14 6\n15 B15 6\n16 B16 6\n17 B17 6\n18 B18 6\n19 B19 6\n20 B20 6\n21 B21 6\n22 B22 6\n23 B23 6\n24 B24 6\n25 B25 6\n26 B26 6\n27 B27 6\n28 B28 6\n29 B29 6\n30 B30 6\n31 B31 6\n\n\nThere are 31 varieties (gen) and it is perfectly balanced, with exactly one observation per treatment per block.\nWe can calculate the sum of missing values in variables in this data set to evaluate the extent of missing values in different variables\n\napply(dat, 2, function(x) sum(is.na(x)))\n\nblock gen yield row col \n 0 0 0 0 0 \n\n\nWe observed no missing data!\nLast, let’s plot a histogram of the dependent variable. This is a quick check before analysis to see if there is any strong deviation in values.\n\n\n\n\n\n\n\n\n\nFigure 9.1: Histogram of the dependent variable.\n\n\n\n\n\nhist(dat$yield, main = \"\", xlab = \"yield\")\n\nResponse variable values fall within expected range, with few extreme values on right tail. This data set is ready for analysis!\n\n\n9.2.1.2 Model Building\nWe will be evaluating the response of yield as affected by gen (fixed effect) and block (random effect).\n\n\nPlease note that incomplete block effect can be analyzed as a fixed (intra-block analysis) or a random (inter-block analysis) effect. When we consider block as a random effect, the mean values of a block also contain information about the treatment effects.\n\nlme4nlme\n\n\n\nmodel_icbd <- lmer(yield ~ gen + (1|block),\n data = dat, \n na.action = na.exclude)\ntidy(model_icbd)\n\n# A tibble: 33 × 8\n effect group term estimate std.error statistic df p.value\n <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>\n 1 fixed <NA> (Intercept) 24.6 0.922 26.7 153. 2.30e-59\n 2 fixed <NA> genG02 2.40 1.17 2.06 129. 4.17e- 2\n 3 fixed <NA> genG03 8.04 1.17 6.88 129. 2.31e-10\n 4 fixed <NA> genG04 2.37 1.17 2.03 129. 4.42e- 2\n 5 fixed <NA> genG05 1.60 1.17 1.37 129. 1.73e- 1\n 6 fixed <NA> genG06 7.39 1.17 6.32 129. 3.82e- 9\n 7 fixed <NA> genG07 -0.419 1.17 -0.359 129. 7.20e- 1\n 8 fixed <NA> genG08 3.04 1.17 2.60 129. 1.04e- 2\n 9 fixed <NA> genG09 4.84 1.17 4.14 129. 6.22e- 5\n10 fixed <NA> genG10 -0.0429 1.17 -0.0367 129. 9.71e- 1\n# ℹ 23 more rows\n\n\n\n\n\nmodel_icbd1 <- lme(yield ~ gen,\n random = ~ 1|block,\n data = dat, \n na.action = na.exclude)\ntidy(model_icbd1)\n\n# A tibble: 33 × 8\n effect group term estimate std.error df statistic p.value\n <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>\n 1 fixed <NA> (Intercept) 24.6 0.922 125 26.7 2.10e-53\n 2 fixed <NA> genG02 2.40 1.17 125 2.06 4.18e- 2\n 3 fixed <NA> genG03 8.04 1.17 125 6.88 2.54e-10\n 4 fixed <NA> genG04 2.37 1.17 125 2.03 4.43e- 2\n 5 fixed <NA> genG05 1.60 1.17 125 1.37 1.73e- 1\n 6 fixed <NA> genG06 7.39 1.17 125 6.32 4.11e- 9\n 7 fixed <NA> genG07 -0.419 1.17 125 -0.359 7.20e- 1\n 8 fixed <NA> genG08 3.04 1.17 125 2.60 1.04e- 2\n 9 fixed <NA> genG09 4.84 1.17 125 4.14 6.33e- 5\n10 fixed <NA> genG10 -0.0429 1.17 125 -0.0367 9.71e- 1\n# ℹ 23 more rows\n\n\n\n\n\n\n\n9.2.1.3 Check Model Assumptions\nLet’s verify the assumption of linear mixed models including normal distribution and constant variance of residuals.\n\nlme4nlme\n\n\n\ncheck_model(model_icbd, check = c('normality', 'linearity'))\n\n\n\n\n\n\n\n\n\n\n\ncheck_model(model_icbd1, check = c('normality', 'linearity'))\n\n\n\n\n\n\n\n\n\n\n\n\n\nHere we observed a right skewness in residuals, this can be resolved by using data transformation e.g. log transformation of response variable. Please refer to chapter to read more about data transformation.\n\n\n9.2.1.4 Inference\nWe can extract information about ANOVA using anova() from lmer and lme models, respectively.\n\nlme4nlme\n\n\n\nanova(model_icbd, type = \"1\")\n\nType I Analysis of Variance Table with Satterthwaite's method\n Sum Sq Mean Sq NumDF DenDF F value Pr(>F) \ngen 1901.1 63.369 30 129.06 17.675 < 2.2e-16 ***\n---\nSignif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n\n\n\n\n\nanova(model_icbd1, type = \"sequential\")\n\n numDF denDF F-value p-value\n(Intercept) 1 125 4042.016 <.0001\ngen 30 125 17.675 <.0001\n\n\n\n\n\nLet’s look at the estimated marginal means of yield for each variety (gen).\n\nlme4nlme\n\n\n\nemmeans(model_icbd, ~ gen)\n\n gen emmean SE df lower.CL upper.CL\n G01 24.6 0.923 153 22.7 26.4\n G02 27.0 0.923 153 25.2 28.8\n G03 32.6 0.923 153 30.8 34.4\n G04 26.9 0.923 153 25.1 28.8\n G05 26.2 0.923 153 24.4 28.0\n G06 32.0 0.923 153 30.1 33.8\n G07 24.2 0.923 153 22.3 26.0\n G08 27.6 0.923 153 25.8 29.4\n G09 29.4 0.923 153 27.6 31.2\n G10 24.5 0.923 153 22.7 26.4\n G11 27.1 0.923 153 25.2 28.9\n G12 29.3 0.923 153 27.4 31.1\n G13 29.9 0.923 153 28.1 31.8\n G14 24.2 0.923 153 22.4 26.1\n G15 26.1 0.923 153 24.3 27.9\n G16 25.9 0.923 153 24.1 27.8\n G17 19.7 0.923 153 17.9 21.5\n G18 25.7 0.923 153 23.9 27.5\n G19 29.0 0.923 153 27.2 30.9\n G20 33.2 0.923 153 31.3 35.0\n G21 31.1 0.923 153 29.3 32.9\n G22 25.2 0.923 153 23.3 27.0\n G23 29.8 0.923 153 28.0 31.6\n G24 33.6 0.923 153 31.8 35.5\n G25 27.0 0.923 153 25.2 28.8\n G26 27.1 0.923 153 25.3 29.0\n G27 23.8 0.923 153 22.0 25.6\n G28 26.5 0.923 153 24.6 28.3\n G29 24.8 0.923 153 22.9 26.6\n G30 36.2 0.923 153 34.4 38.0\n G31 27.1 0.923 153 25.3 28.9\n\nDegrees-of-freedom method: kenward-roger \nConfidence level used: 0.95 \n\n\n\n\n\nemmeans(model_icbd1, ~ gen)\n\n gen emmean SE df lower.CL upper.CL\n G01 24.6 0.922 30 22.7 26.5\n G02 27.0 0.922 30 25.1 28.9\n G03 32.6 0.922 30 30.7 34.5\n G04 26.9 0.922 30 25.1 28.8\n G05 26.2 0.922 30 24.3 28.1\n G06 32.0 0.922 30 30.1 33.8\n G07 24.2 0.922 30 22.3 26.0\n G08 27.6 0.922 30 25.7 29.5\n G09 29.4 0.922 30 27.5 31.3\n G10 24.5 0.922 30 22.6 26.4\n G11 27.1 0.922 30 25.2 28.9\n G12 29.3 0.922 30 27.4 31.1\n G13 29.9 0.922 30 28.1 31.8\n G14 24.2 0.922 30 22.4 26.1\n G15 26.1 0.922 30 24.2 28.0\n G16 25.9 0.922 30 24.0 27.8\n G17 19.7 0.922 30 17.8 21.6\n G18 25.7 0.922 30 23.8 27.6\n G19 29.0 0.922 30 27.2 30.9\n G20 33.2 0.922 30 31.3 35.0\n G21 31.1 0.922 30 29.2 33.0\n G22 25.2 0.922 30 23.3 27.1\n G23 29.8 0.922 30 27.9 31.7\n G24 33.6 0.922 30 31.8 35.5\n G25 27.0 0.922 30 25.1 28.9\n G26 27.1 0.922 30 25.3 29.0\n G27 23.8 0.922 30 21.9 25.7\n G28 26.5 0.922 30 24.6 28.4\n G29 24.8 0.922 30 22.9 26.6\n G30 36.2 0.922 30 34.3 38.1\n G31 27.1 0.922 30 25.2 29.0\n\nDegrees-of-freedom method: containment \nConfidence level used: 0.95 \n\n\n\n\n\n<<<<<<< HEAD",
- "crumbs": [
- "Experiment designs",
- "
9 Incomplete Block Design "
- ]
- },
- {
- "objectID": "chapters/incomplete-block-design.html#data2",
- "href": "chapters/incomplete-block-design.html#data2",
- "title": "9 Incomplete Block Design",
- "section": "9.3 data2",
- "text": "9.3 data2\nThe data used in this example is extracted from the agridat package. This data is a balanced lattice experiment in cotton containing 16 treatments in a 4x4 layout in each of 5 replicates. The response variable in this data is the percentage of young flower buds attacked by boll weevils.\n\ndat3 <- agridat::cochran.lattice\n#head(dat3)\n\n\nTable of variables in the data set\n\n\nrep\nreplication unit\n\n\ntrt\ntreatment factor\n\n\nrow\nrow position for each plot\n\n\ncol\ncolumn position for each plot\n\n\ny\n% of young flower buds attacked\n\n\n\n\nstr(dat3)\n\n'data.frame': 80 obs. of 5 variables:\n $ y : num 9 20.3 17.7 26.3 4.7 9 7.3 8.3 9 6.7 ...\n $ rep: Factor w/ 5 levels \"R1\",\"R2\",\"R3\",..: 1 1 1 1 1 1 1 1 1 1 ...\n $ row: int 1 1 1 1 2 2 2 2 3 3 ...\n $ col: int 1 2 3 4 1 2 3 4 1 2 ...\n $ trt: Factor w/ 16 levels \"T01\",\"T02\",\"T03\",..: 10 12 9 11 2 4 1 3 14 16 ...\n\ntable(dat3$trt, dat3$rep)\n\n \n R1 R2 R3 R4 R5\n T01 1 1 1 1 1\n T02 1 1 1 1 1\n T03 1 1 1 1 1\n T04 1 1 1 1 1\n T05 1 1 1 1 1\n T06 1 1 1 1 1\n T07 1 1 1 1 1\n T08 1 1 1 1 1\n T09 1 1 1 1 1\n T10 1 1 1 1 1\n T11 1 1 1 1 1\n T12 1 1 1 1 1\n T13 1 1 1 1 1\n T14 1 1 1 1 1\n T15 1 1 1 1 1\n T16 1 1 1 1 1\n\n\n\nlibrary(desplot)\ndesplot(dat3, y~row*col|rep,\n text=trt, # aspect unknown, should be 2 or .5\n main=\"cochran.lattice\")\n\n\n\n\n\n\n\n\nHere, we can use the desplot() function from the ‘desplot’ package to visualize the plot plan from lattice design.\n\ndesplot::desplot(dat3, y~row*col|rep,\n text=trt, shorten='none', cex=.6,\n aspect=252/96, # true aspect\n main=\"Balanced incomplete block\")\n\n\n\n\n\n\n\n\n\n9.3.1 Data integrity checks\n\n\n\n\n\n\nHistogram of the dependent variable.\n\n\n\n\n\n9.3.2 Data integrity checks\n\nstr(dat3)\n\n'data.frame': 80 obs. of 5 variables:\n $ y : num 9 20.3 17.7 26.3 4.7 9 7.3 8.3 9 6.7 ...\n $ rep: Factor w/ 5 levels \"R1\",\"R2\",\"R3\",..: 1 1 1 1 1 1 1 1 1 1 ...\n $ row: int 1 1 1 1 2 2 2 2 3 3 ...\n $ col: int 1 2 3 4 1 2 3 4 1 2 ...\n $ trt: Factor w/ 16 levels \"T01\",\"T02\",\"T03\",..: 10 12 9 11 2 4 1 3 14 16 ...\n\n\n\n#dat2$row <- as.factor(dat2$row)\n#dat2$col <- as.factor(dat2$col)\n\ndat3$row <- as.factor(dat3$row)\ndat3$col <- as.factor(dat3$col)\n\n\nhist(dat3$y, main = \"\", xlab = \"yield\")\n\n\n\n\n\n\n\n\n\n\nFigure 9.2: Histogram of the dependent variable.\n\n\n\n\n\nlme4nlme\n\n\n\nm1_a <- lmer(y ~ trt + (1|rep) + (1|rep:row:rep) + (1|rep:col),\n data = dat3,\n na.action = na.exclude)\n\nboundary (singular) fit: see help('isSingular')\n\ntidy(m1_a) \n\n# A tibble: 20 × 8\n effect group term estimate std.error statistic df p.value\n <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>\n 1 fixed <NA> (Intercept) 6.09 2.57 2.37 61.6 0.0208 \n 2 fixed <NA> trtT02 7.64 3.45 2.21 47.8 0.0316 \n 3 fixed <NA> trtT03 2.40 3.45 0.696 47.8 0.490 \n 4 fixed <NA> trtT04 5.25 3.45 1.52 47.8 0.135 \n 5 fixed <NA> trtT05 3.47 3.45 1.01 47.8 0.319 \n 6 fixed <NA> trtT06 1.21 3.45 0.350 47.8 0.728 \n 7 fixed <NA> trtT07 1.21 3.45 0.350 47.8 0.728 \n 8 fixed <NA> trtT08 3.32 3.45 0.963 47.8 0.340 \n 9 fixed <NA> trtT09 4.02 3.45 1.17 47.8 0.249 \n10 fixed <NA> trtT10 9.09 3.45 2.64 47.8 0.0113 \n11 fixed <NA> trtT11 11.8 3.45 3.42 47.8 0.00128\n12 fixed <NA> trtT12 6.76 3.45 1.96 47.8 0.0561 \n13 fixed <NA> trtT13 4.94 3.45 1.43 47.8 0.159 \n14 fixed <NA> trtT14 8.16 3.45 2.36 47.8 0.0222 \n15 fixed <NA> trtT15 3.20 3.45 0.929 47.8 0.358 \n16 fixed <NA> trtT16 4.54 3.45 1.31 47.8 0.195 \n17 ran_pars rep:col sd__(Interc… 1.78 NA NA NA NA \n18 ran_pars rep:row:rep sd__(Interc… 3.30 NA NA NA NA \n19 ran_pars rep sd__(Interc… 0 NA NA NA NA \n20 ran_pars Residual sd__Observa… 4.88 NA NA NA NA \n\n\n\n\n\ndat3$dummy <- factor(1)\n\nm1_b <- lme(y ~ trt,\n random = list(dummy = pdBlocked(list(\n pdIdent(~rep - 1),\n pdIdent(~rep:row - 1),\n pdIdent(~rep:col)))),\n data = dat3, \n na.action = na.exclude)\n\nVarCorr(m1_b)\n\ndummy = pdIdent(rep - 1), pdIdent(rep:row - 1), pdIdent(rep:col) \n Variance StdDev \nrepR1 6.046133e-08 0.0002458889\nrepR2 6.046133e-08 0.0002458889\nrepR3 6.046133e-08 0.0002458889\nrepR4 6.046133e-08 0.0002458889\nrepR5 6.046133e-08 0.0002458889\nrepR1:row1 1.091771e+01 3.3041961026\nrepR2:row1 1.091771e+01 3.3041961026\nrepR3:row1 1.091771e+01 3.3041961026\nrepR4:row1 1.091771e+01 3.3041961026\nrepR5:row1 1.091771e+01 3.3041961026\nrepR1:row2 1.091771e+01 3.3041961026\nrepR2:row2 1.091771e+01 3.3041961026\nrepR3:row2 1.091771e+01 3.3041961026\nrepR4:row2 1.091771e+01 3.3041961026\nrepR5:row2 1.091771e+01 3.3041961026\nrepR1:row3 1.091771e+01 3.3041961026\nrepR2:row3 1.091771e+01 3.3041961026\nrepR3:row3 1.091771e+01 3.3041961026\nrepR4:row3 1.091771e+01 3.3041961026\nrepR5:row3 1.091771e+01 3.3041961026\nrepR1:row4 1.091771e+01 3.3041961026\nrepR2:row4 1.091771e+01 3.3041961026\nrepR3:row4 1.091771e+01 3.3041961026\nrepR4:row4 1.091771e+01 3.3041961026\nrepR5:row4 1.091771e+01 3.3041961026\n(Intercept) 3.169947e+00 1.7804345669\nrepR1:col1 3.169947e+00 1.7804345669\nrepR2:col1 3.169947e+00 1.7804345669\nrepR3:col1 3.169947e+00 1.7804345669\nrepR4:col1 3.169947e+00 1.7804345669\nrepR5:col1 3.169947e+00 1.7804345669\nrepR1:col2 3.169947e+00 1.7804345669\nrepR2:col2 3.169947e+00 1.7804345669\nrepR3:col2 3.169947e+00 1.7804345669\nrepR4:col2 3.169947e+00 1.7804345669\nrepR5:col2 3.169947e+00 1.7804345669\nrepR1:col3 3.169947e+00 1.7804345669\nrepR2:col3 3.169947e+00 1.7804345669\nrepR3:col3 3.169947e+00 1.7804345669\nrepR4:col3 3.169947e+00 1.7804345669\nrepR5:col3 3.169947e+00 1.7804345669\nrepR1:col4 3.169947e+00 1.7804345669\nrepR2:col4 3.169947e+00 1.7804345669\nrepR3:col4 3.169947e+00 1.7804345669\nrepR4:col4 3.169947e+00 1.7804345669\nrepR5:col4 3.169947e+00 1.7804345669\nResidual 2.385960e+01 4.8846291738\n\n\n\n\n\n\n\n9.3.3 Check Model Assumptions\nRemember those iid assumptions? Let’s make sure we actually met them.\n\ncheck_model(m1_a, check = c(\"linearity\", \"normality\"))\n\n\n\n\n\n\n\n\n\n\n9.3.4 Inference\nEstimates for each treatment level can be obtained with the ‘emmeans’ package. And we can extract the ANOVA table from model using anova() function.\n\nanova(m1_a)\n\nType III Analysis of Variance Table with Satterthwaite's method\n Sum Sq Mean Sq NumDF DenDF F value Pr(>F) \ntrt 612.21 40.814 15 47.81 1.7106 0.0808 .\n---\nSignif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n\n\nEstimated marginal means\n\nemmeans(m1_a, ~ trt)\n\n trt emmean SE df lower.CL upper.CL\n T01 6.09 2.68 50 0.70 11.5\n T02 13.73 2.68 50 8.34 19.1\n T03 8.49 2.68 50 3.10 13.9\n T04 11.34 2.68 50 5.95 16.7\n T05 9.56 2.68 50 4.17 15.0\n T06 7.30 2.68 50 1.91 12.7\n T07 7.30 2.68 50 1.91 12.7\n T08 9.41 2.68 50 4.02 14.8\n T09 10.11 2.68 50 4.72 15.5\n T10 15.18 2.68 50 9.79 20.6\n T11 17.90 2.68 50 12.51 23.3\n T12 12.85 2.68 50 7.46 18.2\n T13 11.03 2.68 50 5.64 16.4\n T14 14.25 2.68 50 8.86 19.6\n T15 9.29 2.68 50 3.91 14.7\n T16 10.63 2.68 50 5.24 16.0\n\nDegrees-of-freedom method: kenward-roger \nConfidence level used: 0.95",
- "crumbs": [
- "Experiment designs",
- "
9 Incomplete Block Design "
- ]
- },
- {
- "objectID": "chapters/incomplete-block-design.html#partially-balanced-ibd-alpha-lattice-design",
- "href": "chapters/incomplete-block-design.html#partially-balanced-ibd-alpha-lattice-design",
- "title": "9 Incomplete Block Design",
- "section": "9.4 Partially Balanced IBD (Alpha Lattice Design)",
- "text": "9.4 Partially Balanced IBD (Alpha Lattice Design)\n======= ## Aplha Lattice Design (partially-balanced) >>>>>>> 9f3fbe4a70b3f7fafe48e3c808e0e941732438d6 ### Example Analysis\nIn incomplete block alpha-design, the blocks are grouped into complete replicates. These designs are also termed as “resolvable incomplete block designs” or “partially balanced incomplete block designs”[^analysis-tips-1]. This design has been more commonly used instead of balanced IBD because of it’s practicability, flexibility, and versatility. [^analysis-tips-1]:Patterson, H. D., & Williams, E. (1976). A new class of resolvable incomplete block designs. Biometrika, 63(1), 83-92.\nThe data used in this example is published in John and Williams (1995)1. The data in this trial was laid out in an alpha lattice design. This trial data had 24 genotypes (gen), 6 incomplete blocks, and each replicated 3 times.\nLet’s start analyzing this example firstly by loading the required libraries for linear mixed models:\n\nlme4nlme\n\n\n\nlibrary(lme4); library(lmerTest); library(emmeans)\nlibrary(dplyr); library(broom.mixed); library(performance)\n\n\n\n\nlibrary(nlme); library(broom.mixed); library(emmeans)\nlibrary(dplyr); library(performance)\n\n\n\n\n\ndata1 <- agridat::john.alpha\n\n\nTable of variables in the data set\n\n\nblock\nincomplete blocking unit\n\n\ngen\ngenotype (variety) factor\n\n\nrow\nrow position for each plot\n\n\ncol\ncolumn position for each plot\n\n\nyield\ngrain yield in tonnes/ha\n\n\n\n\n\n\n\n\n\n\n\n\n\n9.4.0.1 Data integrity checks\nLet’s look into the structure of the data first to verify the class of the variables.\n\nstr(data1)\n\n'data.frame': 72 obs. of 7 variables:\n $ plot : int 1 2 3 4 5 6 7 8 9 10 ...\n $ rep : Factor w/ 3 levels \"R1\",\"R2\",\"R3\": 1 1 1 1 1 1 1 1 1 1 ...\n $ block: Factor w/ 6 levels \"B1\",\"B2\",\"B3\",..: 1 1 1 1 2 2 2 2 3 3 ...\n $ gen : Factor w/ 24 levels \"G01\",\"G02\",\"G03\",..: 11 4 5 22 21 10 20 2 23 14 ...\n $ yield: num 4.12 4.45 5.88 4.58 4.65 ...\n $ row : int 1 2 3 4 5 6 7 8 9 10 ...\n $ col : int 1 1 1 1 1 1 1 1 1 1 ...\n\n\nNext step is evaluate the independent variables. Firstly, look at the number of treatments per replication. Each treatment is replicated 3 times.\n\nagg_tbl <- data1 %>% group_by(gen) %>% \n summarise(total_count=n(),\n .groups = 'drop')\nagg_tbl\n\n# A tibble: 24 × 2\n gen total_count\n <fct> <int>\n 1 G01 3\n 2 G02 3\n 3 G03 3\n 4 G04 3\n 5 G05 3\n 6 G06 3\n 7 G07 3\n 8 G08 3\n 9 G09 3\n10 G10 3\n# ℹ 14 more rows\n\n\nThis looks balanced. Also, let’s have a look at the number of times each treatment appear per block.\n\nagg_blk <- aggregate(data1$gen, by=list(data1$block), FUN=length)\nagg_blk\n\n Group.1 x\n1 B1 12\n2 B2 12\n3 B3 12\n4 B4 12\n5 B5 12\n6 B6 12\n\n\n12 treatments randomly appear in incomplete block. Each incomplete block has same number of treatments.\nLastly, before fitting the model, it’s a good idea to look at the distribution of dependent (yield) variable.\n\n\n\n\n\n\n\n\n\nFigure 9.3: Histogram of the dependent variable.\n\n\n\n\n\nhist(data1$yield, main = \"\", xlab = \"yield\")\n\nThe response variables seems to follow a normal distribution curve, with fewer values on extreme lower and higher ends.\n\n\n9.4.0.2 Model Building\n\nlme4nlme\n\n\n\nmod_alpha <- lmer(yield ~ gen + (1|rep:block),\n data = data1, \n na.action = na.exclude)\ntidy(mod_alpha)\n\n# A tibble: 26 × 8\n effect group term estimate std.error statistic df p.value\n <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>\n 1 fixed <NA> (Intercept) 5.09 0.211 24.2 46.8 4.27e-28\n 2 fixed <NA> genG02 -0.617 0.274 -2.25 35.5 3.06e- 2\n 3 fixed <NA> genG03 -1.54 0.272 -5.65 35.1 2.21e- 6\n 4 fixed <NA> genG04 -0.578 0.272 -2.12 35.1 4.08e- 2\n 5 fixed <NA> genG05 -0.0576 0.259 -0.223 33.8 8.25e- 1\n 6 fixed <NA> genG06 -0.610 0.272 -2.24 35.1 3.16e- 2\n 7 fixed <NA> genG07 -0.982 0.259 -3.80 33.8 5.83e- 4\n 8 fixed <NA> genG08 -0.497 0.272 -1.82 35.2 7.65e- 2\n 9 fixed <NA> genG09 -1.62 0.260 -6.23 34.1 4.27e- 7\n10 fixed <NA> genG10 -0.725 0.262 -2.77 34.4 8.96e- 3\n# ℹ 16 more rows\n\n\n\n\n\nmod_alpha1 <- lme(yield ~ gen,\n random = ~ 1|rep/block,\n data = data1, \n na.action = na.exclude)\ntidy(mod_alpha1)\n\nWarning in tidy.lme(mod_alpha1): ran_pars not yet implemented for multiple\nlevels of nesting\n\n\n# A tibble: 24 × 7\n effect term estimate std.error df statistic p.value\n <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>\n 1 fixed (Intercept) 5.11 0.276 31 18.5 2.63e-18\n 2 fixed genG02 -0.629 0.269 31 -2.34 2.61e- 2\n 3 fixed genG03 -1.61 0.268 31 -6.00 1.23e- 6\n 4 fixed genG04 -0.618 0.268 31 -2.30 2.81e- 2\n 5 fixed genG05 -0.0705 0.258 31 -0.274 7.86e- 1\n 6 fixed genG06 -0.571 0.268 31 -2.13 4.12e- 2\n 7 fixed genG07 -0.997 0.258 31 -3.87 5.23e- 4\n 8 fixed genG08 -0.580 0.268 31 -2.16 3.84e- 2\n 9 fixed genG09 -1.61 0.258 31 -6.21 6.71e- 7\n10 fixed genG10 -0.735 0.259 31 -2.83 8.05e- 3\n# ℹ 14 more rows\n\n## need to try pdIdent here\n# model_lme <-lme(yield ~ gen,\n# random = list(one = pdBlocked(list(\n# pdIdent(~ 0 + rep:block)))),\n# data = data1 %>% mutate(one = factor(1)))\n# \n# summary(model_lme)\n\n\n\n\n\n\n9.4.0.3 Check Model Assumptions\nLet’s verify the assumption of linear mixed models including normal distribution and constant variance of residuals.\n\nlme4nlme\n\n\n\ncheck_model(mod_alpha, check = c('normality', 'linearity'))\n\n\n\n\n\n\n\n\n\n\n\ncheck_model(mod_alpha1, check = c('normality', 'linearity'))\n\n\n\n\n\n\n\n#check_model(model_lme, check = c('normality', 'linearity'))\n\n\n\n\n\n\n9.4.0.4 Inference\nLet’s ANOVA table using anova() from lmer and lme models, respectively.\n\nlme4nlme\n\n\n\nanova(mod_alpha, type = \"1\")\n\nType I Analysis of Variance Table with Satterthwaite's method\n Sum Sq Mean Sq NumDF DenDF F value Pr(>F) \ngen 10.285 0.44718 23 34.062 5.4044 5.51e-06 ***\n---\nSignif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n\n\n\n\n\nanova(mod_alpha1, type = \"sequential\")\n\n numDF denDF F-value p-value\n(Intercept) 1 31 470.9507 <.0001\ngen 23 31 5.4478 <.0001\n\n#anova(model_lme, type = \"sequential\")\n\n\n\n\nLet’s look at the estimated marginal means of yield for each variety (gen).\n\nlme4nlme\n\n\n\nemmeans(mod_alpha, ~ gen)\n\n gen emmean SE df lower.CL upper.CL\n G01 5.09 0.212 46.8 4.66 5.52\n G02 4.47 0.212 46.8 4.05 4.90\n G03 3.55 0.212 46.8 3.13 3.98\n G04 4.51 0.212 46.8 4.09 4.94\n G05 5.03 0.212 46.8 4.61 5.46\n G06 4.48 0.212 46.8 4.06 4.91\n G07 4.11 0.212 46.8 3.68 4.54\n G08 4.59 0.212 46.8 4.17 5.02\n G09 3.47 0.212 46.8 3.04 3.90\n G10 4.37 0.212 46.8 3.94 4.79\n G11 4.25 0.212 46.8 3.82 4.68\n G12 4.70 0.212 46.8 4.27 5.13\n G13 4.74 0.212 46.8 4.32 5.17\n G14 4.84 0.212 46.8 4.41 5.27\n G15 4.99 0.212 46.8 4.57 5.42\n G16 4.73 0.212 46.8 4.30 5.15\n G17 4.56 0.212 46.8 4.13 4.98\n G18 4.34 0.212 46.8 3.91 4.77\n G19 4.84 0.212 46.8 4.41 5.27\n G20 4.12 0.212 46.8 3.69 4.54\n G21 4.78 0.212 46.8 4.35 5.21\n G22 4.49 0.212 46.8 4.07 4.92\n G23 4.28 0.212 46.8 3.86 4.71\n G24 4.15 0.212 46.8 3.72 4.58\n\nDegrees-of-freedom method: kenward-roger \nConfidence level used: 0.95 \n\n\n\n\n\nemmeans(mod_alpha1, ~ gen)\n\n gen emmean SE df lower.CL upper.CL\n G01 5.11 0.276 2 3.92 6.30\n G02 4.48 0.276 2 3.29 5.67\n G03 3.50 0.276 2 2.31 4.69\n G04 4.49 0.276 2 3.30 5.68\n G05 5.04 0.276 2 3.85 6.22\n G06 4.54 0.276 2 3.35 5.72\n G07 4.11 0.276 2 2.92 5.30\n G08 4.53 0.276 2 3.34 5.72\n G09 3.50 0.276 2 2.31 4.69\n G10 4.37 0.276 2 3.19 5.56\n G11 4.28 0.276 2 3.10 5.47\n G12 4.76 0.276 2 3.57 5.94\n G13 4.76 0.276 2 3.57 5.95\n G14 4.78 0.276 2 3.59 5.96\n G15 4.97 0.276 2 3.78 6.16\n G16 4.73 0.276 2 3.54 5.92\n G17 4.60 0.276 2 3.42 5.79\n G18 4.36 0.276 2 3.17 5.55\n G19 4.84 0.276 2 3.65 6.03\n G20 4.04 0.276 2 2.85 5.23\n G21 4.80 0.276 2 3.61 5.98\n G22 4.53 0.276 2 3.34 5.72\n G23 4.25 0.276 2 3.06 5.44\n G24 4.15 0.276 2 2.97 5.34\n\nDegrees-of-freedom method: containment \nConfidence level used: 0.95",
- "crumbs": [
- "Experiment designs",
- "
9 Incomplete Block Design "
- ]
- },
- {
- "objectID": "chapters/incomplete-block-design.html#footnotes",
- "href": "chapters/incomplete-block-design.html#footnotes",
- "title": "9 Incomplete Block Design",
- "section": "",
- "text": "Hering, F. (1996). John, JA, Williams, ER: Cyclic and Computer Generated Designs. Chapmann and Hall, London, New York 1995, 255 S., $ L 32,‐.↩︎",
+ "section": "9.2 Examples Analyses",
+ "text": "9.2 Examples Analyses\n\n9.2.1 Balanced Incomplete Block Design\nWe will demonstrate an example data set designed in a balanced incomplete block design. First, load the libraries required for analysis and estimation.\n\nlme4nlme\n\n\n\nlibrary(lme4); library(lmerTest); library(emmeans)\nlibrary(dplyr); library(broom.mixed); library(performance)\n\n\n\n\nlibrary(nlme); library(broom.mixed); library(emmeans)\nlibrary(dplyr); library(performance)\n\n\n\n\nThe data used for this example analysis was extracted from the agridat package. This example is comprised of soybean balanced incomplete block experiment.\n\ndat <- agridat::weiss.incblock\n\n\nTable of variables in the data set\n\n\nblock\nblocking unit\n\n\ngen\ngenotype (variety) factor\n\n\nrow\nrow position for each plot\n\n\ncol\ncolumn position for each plot\n\n\nyield\ngrain yield in bu/ac\n\n\n\n\n\n\n\n\n\n\n\n\n\n9.2.1.1 Data integrity checks\nWe will start inspecting the data set firstly by looking at the class of each variable:\n\nstr(dat)\n\n'data.frame': 186 obs. of 5 variables:\n $ block: Factor w/ 31 levels \"B01\",\"B02\",\"B03\",..: 1 2 3 4 5 6 7 8 9 10 ...\n $ gen : Factor w/ 31 levels \"G01\",\"G02\",\"G03\",..: 24 15 20 18 20 5 22 1 9 14 ...\n $ yield: num 29.8 24.2 30.5 20 35.2 25 23.6 23.6 29.3 25.5 ...\n $ row : int 42 36 30 24 18 12 6 42 36 30 ...\n $ col : int 1 1 1 1 1 1 1 2 2 2 ...\n\n\nThe variables we need for the model are block, genand yield. The block and gen are classified as factor variables and yield is numeric. Therefore, we do not need to change class of any of the required variables.\nNext, let’s check the independent variables. We can look at this by running a cross tabulations among block and gen factors.\n\nagg_tbl <- dat %>% group_by(gen) %>% \n summarise(total_count=n(),\n .groups = 'drop')\nagg_tbl\n\n# A tibble: 31 × 2\n gen total_count\n <fct> <int>\n 1 G01 6\n 2 G02 6\n 3 G03 6\n 4 G04 6\n 5 G05 6\n 6 G06 6\n 7 G07 6\n 8 G08 6\n 9 G09 6\n10 G10 6\n# ℹ 21 more rows\n\n\n\nagg_df <- aggregate(dat$gen, by=list(dat$block), FUN=length)\nagg_df\n\n Group.1 x\n1 B01 6\n2 B02 6\n3 B03 6\n4 B04 6\n5 B05 6\n6 B06 6\n7 B07 6\n8 B08 6\n9 B09 6\n10 B10 6\n11 B11 6\n12 B12 6\n13 B13 6\n14 B14 6\n15 B15 6\n16 B16 6\n17 B17 6\n18 B18 6\n19 B19 6\n20 B20 6\n21 B21 6\n22 B22 6\n23 B23 6\n24 B24 6\n25 B25 6\n26 B26 6\n27 B27 6\n28 B28 6\n29 B29 6\n30 B30 6\n31 B31 6\n\n\nThere are 31 varieties (levels of gen) and it is perfectly balanced, with exactly one observation per treatment per block.\nWe can calculate the sum of missing values in variables in this data set to evaluate the extent of missing values in different variables:\n\napply(dat, 2, function(x) sum(is.na(x)))\n\nblock gen yield row col \n 0 0 0 0 0 \n\n\nNo missing data!\nLast, let’s plot a histogram of the dependent variable. This is a quick check before analysis to see if there is any strong deviation in values.\n\n\n\n\n\n\n\n\n\nFigure 9.1: Histogram of the dependent variable.\n\n\n\n\n\nhist(dat$yield, main = \"\", xlab = \"yield\")\n\nResponse variable values fall within expected range, with few extreme values on right tail. This data set is ready for analysis!\n\n\n9.2.1.2 Model Building\nWe will be evaluating the response of yield as affected by gen (fixed effect) and block (random effect).\n\n\nPlease note that incomplete block effect can be analyzed as a fixed (intra-block analysis) or a random (inter-block analysis) effect. When we consider block as a random effect, the mean values of a block also contain information about the treatment effects.\n\nlme4nlme\n\n\n\nmodel_icbd <- lmer(yield ~ gen + (1|block),\n data = dat, \n na.action = na.exclude)\ntidy(model_icbd)\n\n# A tibble: 33 × 8\n effect group term estimate std.error statistic df p.value\n <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>\n 1 fixed <NA> (Intercept) 24.6 0.922 26.7 153. 2.30e-59\n 2 fixed <NA> genG02 2.40 1.17 2.06 129. 4.17e- 2\n 3 fixed <NA> genG03 8.04 1.17 6.88 129. 2.31e-10\n 4 fixed <NA> genG04 2.37 1.17 2.03 129. 4.42e- 2\n 5 fixed <NA> genG05 1.60 1.17 1.37 129. 1.73e- 1\n 6 fixed <NA> genG06 7.39 1.17 6.32 129. 3.82e- 9\n 7 fixed <NA> genG07 -0.419 1.17 -0.359 129. 7.20e- 1\n 8 fixed <NA> genG08 3.04 1.17 2.60 129. 1.04e- 2\n 9 fixed <NA> genG09 4.84 1.17 4.14 129. 6.22e- 5\n10 fixed <NA> genG10 -0.0429 1.17 -0.0367 129. 9.71e- 1\n# ℹ 23 more rows\n\n\n\n\n\nmodel_icbd1 <- lme(yield ~ gen,\n random = ~ 1|block,\n data = dat, \n na.action = na.exclude)\ntidy(model_icbd1)\n\n# A tibble: 33 × 8\n effect group term estimate std.error df statistic p.value\n <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>\n 1 fixed <NA> (Intercept) 24.6 0.922 125 26.7 2.10e-53\n 2 fixed <NA> genG02 2.40 1.17 125 2.06 4.18e- 2\n 3 fixed <NA> genG03 8.04 1.17 125 6.88 2.54e-10\n 4 fixed <NA> genG04 2.37 1.17 125 2.03 4.43e- 2\n 5 fixed <NA> genG05 1.60 1.17 125 1.37 1.73e- 1\n 6 fixed <NA> genG06 7.39 1.17 125 6.32 4.11e- 9\n 7 fixed <NA> genG07 -0.419 1.17 125 -0.359 7.20e- 1\n 8 fixed <NA> genG08 3.04 1.17 125 2.60 1.04e- 2\n 9 fixed <NA> genG09 4.84 1.17 125 4.14 6.33e- 5\n10 fixed <NA> genG10 -0.0429 1.17 125 -0.0367 9.71e- 1\n# ℹ 23 more rows\n\n\n\n\n\n\n\n9.2.1.3 Check Model Assumptions\nLet’s verify the assumption of linear mixed models including normal distribution and constant variance of residuals.\n\nlme4nlme\n\n\n\ncheck_model(model_icbd, check = c('normality', 'linearity'))\n\n\n\n\n\n\n\n\n\n\n\ncheck_model(model_icbd1, check = c('normality', 'linearity'))\n\n\n\n\n\n\n\n\n\n\n\n\n\nHere we observed a right skewness in residuals, this can be resolved by using data transformation e.g. log transformation of response variable. Please refer to chapter to read more about data transformation.\n\n\n9.2.1.4 Inference\nWe can extract information about ANOVA using anova().\n\nlme4nlme\n\n\n\nanova(model_icbd, type = \"1\")\n\nType I Analysis of Variance Table with Satterthwaite's method\n Sum Sq Mean Sq NumDF DenDF F value Pr(>F) \ngen 1901.1 63.369 30 129.06 17.675 < 2.2e-16 ***\n---\nSignif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n\n\n\n\n\nanova(model_icbd1, type = \"sequential\")\n\n numDF denDF F-value p-value\n(Intercept) 1 125 4042.016 <.0001\ngen 30 125 17.675 <.0001\n\n\n\n\n\nLet’s look at the estimated marginal means of yield for each variety (gen).\n\nlme4nlme\n\n\n\nemmeans(model_icbd, ~ gen)\n\n gen emmean SE df lower.CL upper.CL\n G01 24.6 0.923 153 22.7 26.4\n G02 27.0 0.923 153 25.2 28.8\n G03 32.6 0.923 153 30.8 34.4\n G04 26.9 0.923 153 25.1 28.8\n G05 26.2 0.923 153 24.4 28.0\n G06 32.0 0.923 153 30.1 33.8\n G07 24.2 0.923 153 22.3 26.0\n G08 27.6 0.923 153 25.8 29.4\n G09 29.4 0.923 153 27.6 31.2\n G10 24.5 0.923 153 22.7 26.4\n G11 27.1 0.923 153 25.2 28.9\n G12 29.3 0.923 153 27.4 31.1\n G13 29.9 0.923 153 28.1 31.8\n G14 24.2 0.923 153 22.4 26.1\n G15 26.1 0.923 153 24.3 27.9\n G16 25.9 0.923 153 24.1 27.8\n G17 19.7 0.923 153 17.9 21.5\n G18 25.7 0.923 153 23.9 27.5\n G19 29.0 0.923 153 27.2 30.9\n G20 33.2 0.923 153 31.3 35.0\n G21 31.1 0.923 153 29.3 32.9\n G22 25.2 0.923 153 23.3 27.0\n G23 29.8 0.923 153 28.0 31.6\n G24 33.6 0.923 153 31.8 35.5\n G25 27.0 0.923 153 25.2 28.8\n G26 27.1 0.923 153 25.3 29.0\n G27 23.8 0.923 153 22.0 25.6\n G28 26.5 0.923 153 24.6 28.3\n G29 24.8 0.923 153 22.9 26.6\n G30 36.2 0.923 153 34.4 38.0\n G31 27.1 0.923 153 25.3 28.9\n\nDegrees-of-freedom method: kenward-roger \nConfidence level used: 0.95 \n\n\n\n\n\nemmeans(model_icbd1, ~ gen)\n\n gen emmean SE df lower.CL upper.CL\n G01 24.6 0.922 30 22.7 26.5\n G02 27.0 0.922 30 25.1 28.9\n G03 32.6 0.922 30 30.7 34.5\n G04 26.9 0.922 30 25.1 28.8\n G05 26.2 0.922 30 24.3 28.1\n G06 32.0 0.922 30 30.1 33.8\n G07 24.2 0.922 30 22.3 26.0\n G08 27.6 0.922 30 25.7 29.5\n G09 29.4 0.922 30 27.5 31.3\n G10 24.5 0.922 30 22.6 26.4\n G11 27.1 0.922 30 25.2 28.9\n G12 29.3 0.922 30 27.4 31.1\n G13 29.9 0.922 30 28.1 31.8\n G14 24.2 0.922 30 22.4 26.1\n G15 26.1 0.922 30 24.2 28.0\n G16 25.9 0.922 30 24.0 27.8\n G17 19.7 0.922 30 17.8 21.6\n G18 25.7 0.922 30 23.8 27.6\n G19 29.0 0.922 30 27.2 30.9\n G20 33.2 0.922 30 31.3 35.0\n G21 31.1 0.922 30 29.2 33.0\n G22 25.2 0.922 30 23.3 27.1\n G23 29.8 0.922 30 27.9 31.7\n G24 33.6 0.922 30 31.8 35.5\n G25 27.0 0.922 30 25.1 28.9\n G26 27.1 0.922 30 25.3 29.0\n G27 23.8 0.922 30 21.9 25.7\n G28 26.5 0.922 30 24.6 28.4\n G29 24.8 0.922 30 22.9 26.6\n G30 36.2 0.922 30 34.3 38.1\n G31 27.1 0.922 30 25.2 29.0\n\nDegrees-of-freedom method: containment \nConfidence level used: 0.95 \n\n\n\n\n\n\n\n\n9.2.2 Partially Balanced IBD (Alpha Lattice Design)\nThe data used in this example is published in Cyclic and Computer Generated Designs (John and Williams 1995). The data in this trial was laid out in an alpha lattice design. This trial data had 24 genotypes (“gen”), 6 incomplete blocks, each replicated 3 times.\nLet’s start analyzing this example first by loading the required libraries for linear mixed models:\n\nlme4nlme\n\n\n\nlibrary(lme4); library(lmerTest); library(emmeans)\nlibrary(dplyr); library(broom.mixed); library(performance)\n\n\n\n\nlibrary(nlme); library(broom.mixed); library(emmeans)\nlibrary(dplyr); library(performance)\n\n\n\n\n\ndata1 <- agridat::john.alpha\n\n\nTable of variables in the data set\n\n\nblock\nincomplete blocking unit\n\n\ngen\ngenotype (variety) factor\n\n\nrow\nrow position for each plot\n\n\ncol\ncolumn position for each plot\n\n\nyield\ngrain yield in tonnes/ha\n\n\n\n\n\n\n\n\n\n\n\n\n\n9.2.2.1 Data integrity checks\nLet’s look into the structure of the data first to verify the class of the variables.\n\nstr(data1)\n\n'data.frame': 72 obs. of 7 variables:\n $ plot : int 1 2 3 4 5 6 7 8 9 10 ...\n $ rep : Factor w/ 3 levels \"R1\",\"R2\",\"R3\": 1 1 1 1 1 1 1 1 1 1 ...\n $ block: Factor w/ 6 levels \"B1\",\"B2\",\"B3\",..: 1 1 1 1 2 2 2 2 3 3 ...\n $ gen : Factor w/ 24 levels \"G01\",\"G02\",\"G03\",..: 11 4 5 22 21 10 20 2 23 14 ...\n $ yield: num 4.12 4.45 5.88 4.58 4.65 ...\n $ row : int 1 2 3 4 5 6 7 8 9 10 ...\n $ col : int 1 1 1 1 1 1 1 1 1 1 ...\n\n\nNext step is to evaluate the independent variables. First, check the number of treatments per replication (each treatment should be replicated 3 times).\n\nagg_tbl <- data1 %>% group_by(gen) %>% \n summarise(total_count=n(),\n .groups = 'drop')\nagg_tbl\n\n# A tibble: 24 × 2\n gen total_count\n <fct> <int>\n 1 G01 3\n 2 G02 3\n 3 G03 3\n 4 G04 3\n 5 G05 3\n 6 G06 3\n 7 G07 3\n 8 G08 3\n 9 G09 3\n10 G10 3\n# ℹ 14 more rows\n\n\nThis looks balanced, as expected.\nAlso, let’s have a look at the number of times each treatment appear per block.\n\nagg_blk <- aggregate(data1$gen, by=list(data1$block), FUN=length)\nagg_blk\n\n Group.1 x\n1 B1 12\n2 B2 12\n3 B3 12\n4 B4 12\n5 B5 12\n6 B6 12\n\n\n12 treatments randomly appear in incomplete block. Each incomplete block has same number of treatments.\nLastly, before fitting the model, it’s a good idea to look at the distribution of dependent variable, yield.\n\n\n\n\n\n\n\n\n\nFigure 9.2: Histogram of the dependent variable.\n\n\n\n\n\nhist(data1$yield, main = \"\", xlab = \"yield\")\n\nThe response variables seems to follow a normal distribution curve, with fewer values on extreme lower and higher ends.\n\n\n9.2.2.2 Model Building\n\nlme4nlme\n\n\n\nmod_alpha <- lmer(yield ~ gen + (1|rep:block),\n data = data1, \n na.action = na.exclude)\ntidy(mod_alpha)\n\n# A tibble: 26 × 8\n effect group term estimate std.error statistic df p.value\n <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>\n 1 fixed <NA> (Intercept) 5.09 0.211 24.2 46.8 4.27e-28\n 2 fixed <NA> genG02 -0.617 0.274 -2.25 35.5 3.06e- 2\n 3 fixed <NA> genG03 -1.54 0.272 -5.65 35.1 2.21e- 6\n 4 fixed <NA> genG04 -0.578 0.272 -2.12 35.1 4.08e- 2\n 5 fixed <NA> genG05 -0.0576 0.259 -0.223 33.8 8.25e- 1\n 6 fixed <NA> genG06 -0.610 0.272 -2.24 35.1 3.16e- 2\n 7 fixed <NA> genG07 -0.982 0.259 -3.80 33.8 5.83e- 4\n 8 fixed <NA> genG08 -0.497 0.272 -1.82 35.2 7.65e- 2\n 9 fixed <NA> genG09 -1.62 0.260 -6.23 34.1 4.27e- 7\n10 fixed <NA> genG10 -0.725 0.262 -2.77 34.4 8.96e- 3\n# ℹ 16 more rows\n\n\n\n\n\nmod_alpha1 <- lme(yield ~ gen,\n random = ~ 1|rep/block,\n data = data1, \n na.action = na.exclude)\ntidy(mod_alpha1)\n\nWarning in tidy.lme(mod_alpha1): ran_pars not yet implemented for multiple\nlevels of nesting\n\n\n# A tibble: 24 × 7\n effect term estimate std.error df statistic p.value\n <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>\n 1 fixed (Intercept) 5.11 0.276 31 18.5 2.63e-18\n 2 fixed genG02 -0.629 0.269 31 -2.34 2.61e- 2\n 3 fixed genG03 -1.61 0.268 31 -6.00 1.23e- 6\n 4 fixed genG04 -0.618 0.268 31 -2.30 2.81e- 2\n 5 fixed genG05 -0.0705 0.258 31 -0.274 7.86e- 1\n 6 fixed genG06 -0.571 0.268 31 -2.13 4.12e- 2\n 7 fixed genG07 -0.997 0.258 31 -3.87 5.23e- 4\n 8 fixed genG08 -0.580 0.268 31 -2.16 3.84e- 2\n 9 fixed genG09 -1.61 0.258 31 -6.21 6.71e- 7\n10 fixed genG10 -0.735 0.259 31 -2.83 8.05e- 3\n# ℹ 14 more rows\n\n## need to try pdIdent here\n# model_lme <-lme(yield ~ gen,\n# random = list(one = pdBlocked(list(\n# pdIdent(~ 0 + rep:block)))),\n# data = data1 %>% mutate(one = factor(1)))\n# \n# summary(model_lme)\n\n\n\n\n\n\n9.2.2.3 Check Model Assumptions\nLet’s verify the assumption of linear mixed models including normal distribution and constant variance of residuals.\n\nlme4nlme\n\n\n\ncheck_model(mod_alpha, check = c('normality', 'linearity'))\n\n\n\n\n\n\n\n\n\n\n\ncheck_model(mod_alpha1, check = c('normality', 'linearity'))\n\n\n\n\n\n\n\n#check_model(model_lme, check = c('normality', 'linearity'))\n\n\n\n\n\n\n9.2.2.4 Inference\nLet’s ANOVA table using anova() from lmer and lme models, respectively.\n\nlme4nlme\n\n\n\nanova(mod_alpha, type = \"1\")\n\nType I Analysis of Variance Table with Satterthwaite's method\n Sum Sq Mean Sq NumDF DenDF F value Pr(>F) \ngen 10.285 0.44718 23 34.062 5.4044 5.51e-06 ***\n---\nSignif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n\n\n\n\n\nanova(mod_alpha1, type = \"sequential\")\n\n numDF denDF F-value p-value\n(Intercept) 1 31 470.9507 <.0001\ngen 23 31 5.4478 <.0001\n\n#anova(model_lme, type = \"sequential\")\n\n\n\n\nLet’s look at the estimated marginal means of yield for each variety (gen).\n\nlme4nlme\n\n\n\nemmeans(mod_alpha, ~ gen)\n\n gen emmean SE df lower.CL upper.CL\n G01 5.09 0.212 46.8 4.66 5.52\n G02 4.47 0.212 46.8 4.05 4.90\n G03 3.55 0.212 46.8 3.13 3.98\n G04 4.51 0.212 46.8 4.09 4.94\n G05 5.03 0.212 46.8 4.61 5.46\n G06 4.48 0.212 46.8 4.06 4.91\n G07 4.11 0.212 46.8 3.68 4.54\n G08 4.59 0.212 46.8 4.17 5.02\n G09 3.47 0.212 46.8 3.04 3.90\n G10 4.37 0.212 46.8 3.94 4.79\n G11 4.25 0.212 46.8 3.82 4.68\n G12 4.70 0.212 46.8 4.27 5.13\n G13 4.74 0.212 46.8 4.32 5.17\n G14 4.84 0.212 46.8 4.41 5.27\n G15 4.99 0.212 46.8 4.57 5.42\n G16 4.73 0.212 46.8 4.30 5.15\n G17 4.56 0.212 46.8 4.13 4.98\n G18 4.34 0.212 46.8 3.91 4.77\n G19 4.84 0.212 46.8 4.41 5.27\n G20 4.12 0.212 46.8 3.69 4.54\n G21 4.78 0.212 46.8 4.35 5.21\n G22 4.49 0.212 46.8 4.07 4.92\n G23 4.28 0.212 46.8 3.86 4.71\n G24 4.15 0.212 46.8 3.72 4.58\n\nDegrees-of-freedom method: kenward-roger \nConfidence level used: 0.95 \n\n\n\n\n\nemmeans(mod_alpha1, ~ gen)\n\n gen emmean SE df lower.CL upper.CL\n G01 5.11 0.276 2 3.92 6.30\n G02 4.48 0.276 2 3.29 5.67\n G03 3.50 0.276 2 2.31 4.69\n G04 4.49 0.276 2 3.30 5.68\n G05 5.04 0.276 2 3.85 6.22\n G06 4.54 0.276 2 3.35 5.72\n G07 4.11 0.276 2 2.92 5.30\n G08 4.53 0.276 2 3.34 5.72\n G09 3.50 0.276 2 2.31 4.69\n G10 4.37 0.276 2 3.19 5.56\n G11 4.28 0.276 2 3.10 5.47\n G12 4.76 0.276 2 3.57 5.94\n G13 4.76 0.276 2 3.57 5.95\n G14 4.78 0.276 2 3.59 5.96\n G15 4.97 0.276 2 3.78 6.16\n G16 4.73 0.276 2 3.54 5.92\n G17 4.60 0.276 2 3.42 5.79\n G18 4.36 0.276 2 3.17 5.55\n G19 4.84 0.276 2 3.65 6.03\n G20 4.04 0.276 2 2.85 5.23\n G21 4.80 0.276 2 3.61 5.98\n G22 4.53 0.276 2 3.34 5.72\n G23 4.25 0.276 2 3.06 5.44\n G24 4.15 0.276 2 2.97 5.34\n\nDegrees-of-freedom method: containment \nConfidence level used: 0.95 \n\n\n\n\n\n\n\n\n\nJohn, JA, and ER Williams. 1995. Cyclic and Computer Generated Designs. 2nd ed. New York: Chapman; Hall/CRC Press. https://doi.org/10.1201/b15075.\n\n\nPatterson, H. D., and E. R. Williams. 1976. “A New Class of Resolvable Incomplete Block Designs.” Biometrika 63 (1): 83–92. https://doi.org/10.2307/2335087.\n\n\nYates, F. 1936. “A New Method of Arranging Variety Trials Involving a Large Number of Varieties.” J Agric Sci 26: 424–55.",
"crumbs": [
"Experiment designs",
"
9 Incomplete Block Design "
@@ -525,7 +492,7 @@
"href": "chapters/additional-resources.html#further-reading",
"title": "15 Additional Resources",
"section": "",
- "text": "lme4 vignette for fitting linear mixed models\nMixed-Effects Models in S and S-PLUS thee book for nlme, by José C. Pinheiro and Douglas M. Bates. We used this book extensively for developing this guide. Sadly, it’s both out of print and we could not find a free copy online. However, there are affordable used copies available.\nMixed Effects Models and Extensions in Ecology with R by Alain F. Zuur, Elena N. Ieno, Neil Walker, Anatoly A. Saveliev, and Graham M. Smith.",
+ "text": "lme4 vignette for fitting linear mixed models\nMixed-Effects Models in S and S-PLUS thee book for nlme, by José C. Pinheiro and Douglas M. Bates. We used this book extensively for developing this guide. Sadly, it’s both out of print and we could not find a free copy online. However, there are affordable used copies available.\nMixed Effects Models and Extensions in Ecology with R by Alain F. Zuur, Elena N. Ieno, Neil Walker, Anatoly A. Saveliev, and Graham M. Smith.\nANOVA and Mixed Models by Lukas Meier",
"crumbs": [
"
15 Additional Resources "
]
@@ -545,7 +512,7 @@
"href": "references.html",
"title": "References",
"section": "",
- "text": "Bates, Douglas, Martin Mächler, Ben Bolker, and Steve Walker. 2015.\n“Fitting Linear Mixed-Effects Models Using lme4.” Journal of Statistical\nSoftware 67 (1): 1–48. https://doi.org/10.18637/jss.v067.i01.\n\n\nBolker, Ben, and David Robinson. 2024. Broom.mixed: Tidying Methods\nfor Mixed Models. https://CRAN.R-project.org/package=broom.mixed.\n\n\nHartig, Florian. 2022. DHARMa: Residual Diagnostics for Hierarchical\n(Multi-Level / Mixed) Regression Models. https://CRAN.R-project.org/package=DHARMa.\n\n\nKuznetsova, Alexandra, Per B. Brockhoff, and Rune H. B. Christensen.\n2017. “lmerTest Package: Tests in\nLinear Mixed Effects Models.” Journal of Statistical\nSoftware 82 (13): 1–26. https://doi.org/10.18637/jss.v082.i13.\n\n\nLenth, Russell V. 2022. Emmeans: Estimated Marginal Means, Aka\nLeast-Squares Means. https://CRAN.R-project.org/package=emmeans.\n\n\nLüdecke, Daniel, Mattan S. Ben-Shachar, Indrajeet Patil, Philip\nWaggoner, and Dominique Makowski. 2021. “performance: An R Package for\nAssessment, Comparison and Testing of Statistical Models.”\nJournal of Open Source Software 6 (60): 3139. https://doi.org/10.21105/joss.03139.\n\n\nPinheiro, José C., and Douglas M. Bates. 2000. Mixed-Effects Models\nin s and s-PLUS. New York: Springer. https://doi.org/10.1007/b98882.\n\n\nPinheiro, José, Douglas Bates, and R Core Team. 2023. Nlme: Linear\nand Nonlinear Mixed Effects Models. https://CRAN.R-project.org/package=nlme.",
+ "text": "Bates, Douglas, Martin Mächler, Ben Bolker, and Steve Walker. 2015.\n“Fitting Linear Mixed-Effects Models Using lme4.” Journal of Statistical\nSoftware 67 (1): 1–48. https://doi.org/10.18637/jss.v067.i01.\n\n\nBolker, Ben, and David Robinson. 2024. Broom.mixed: Tidying Methods\nfor Mixed Models. https://CRAN.R-project.org/package=broom.mixed.\n\n\nHartig, Florian. 2022. DHARMa: Residual Diagnostics for Hierarchical\n(Multi-Level / Mixed) Regression Models. https://CRAN.R-project.org/package=DHARMa.\n\n\nJohn, JA, and ER Williams. 1995. Cyclic and Computer\nGenerated Designs. 2nd ed. New York:\nChapman; Hall/CRC Press. https://doi.org/10.1201/b15075.\n\n\nKuznetsova, Alexandra, Per B. Brockhoff, and Rune H. B. Christensen.\n2017. “lmerTest Package: Tests in\nLinear Mixed Effects Models.” Journal of Statistical\nSoftware 82 (13): 1–26. https://doi.org/10.18637/jss.v082.i13.\n\n\nLenth, Russell V. 2022. Emmeans: Estimated Marginal Means, Aka\nLeast-Squares Means. https://CRAN.R-project.org/package=emmeans.\n\n\nLüdecke, Daniel, Mattan S. Ben-Shachar, Indrajeet Patil, Philip\nWaggoner, and Dominique Makowski. 2021. “performance: An R Package for\nAssessment, Comparison and Testing of Statistical Models.”\nJournal of Open Source Software 6 (60): 3139. https://doi.org/10.21105/joss.03139.\n\n\nPinheiro, José C., and Douglas M. Bates. 2000. Mixed-Effects Models\nin s and s-PLUS. New York: Springer. https://doi.org/10.1007/b98882.\n\n\nPinheiro, José, Douglas Bates, and R Core Team. 2023. Nlme: Linear\nand Nonlinear Mixed Effects Models. https://CRAN.R-project.org/package=nlme.\n\n\nYates, F. 1936. “A New Method of Arranging Variety Trials\nInvolving a Large Number of Varieties.” J Agric Sci 26:\n424–55.",
"crumbs": [
"References"
]