library(car)
library(dae)
library(dplyr)
library(emmeans)
library(ggplot2)
library(lmerTest)
library(magrittr)
library(predictmeans)
data(DataExam2.1)
# Pg. 22
.3 <- lm(formula = dbh ~ seedlot, data = DataExam2.1)
fmtab2
# Pg. 23
anova(fmtab2.3)
Analysis of Variance Table
: dbh
ResponsePr(>F)
Df Sum Sq Mean Sq F value 1 14.27 14.2695 3.2531 0.09284 .
seedlot 14 61.41 4.3864
Residuals ---
: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Signif. codes
# Pg. 23
emmeans(object = fmtab2.3, specs = ~ seedlot)
seedlot emmean SE df lower.CL upper.CL30.6 0.74 14 29.0 32.2
SO 28.7 0.74 14 27.1 30.3
P
: 0.95
Confidence level used
emmip(object = fmtab2.3, formula = ~ seedlot) +
theme_classic()
2 Experimental Planning and Layout
2.1 Example 2.1 (Pg. 24)
Example 2.1 (Pg. 24)
A field trial was planted to compare a seedlot derived from a seed orchard (SO) with one collected from a routine plantation (P). There were eight plots of each seedlot, thinned at seven years of age. Tree diameters at breast height (dbh) were measured at 15 years and plot means calculated.
2.2 Example 2.2 (Pg. 26)
Example 2.2 (Pg. 26)
library(car)
library(dae)
library(dplyr)
library(emmeans)
library(ggplot2)
library(lmerTest)
library(magrittr)
library(predictmeans)
data(DataExam2.2)
# Pg. 24
.5 <-
fmtab2lm(
formula = dbh ~ block + seedlot
data = DataExam2.2
,
)
# Pg. 26
anova(fmtab2.5)
Analysis of Variance Table
: dbh
ResponsePr(>F)
Df Sum Sq Mean Sq F value 7 48.867 6.9810 3.8959 0.04671 *
block 1 14.270 14.2695 7.9635 0.02570 *
seedlot 7 12.543 1.7919
Residuals ---
: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Signif. codes
# Pg. 26
emmeans(object = fmtab2.5, specs = ~ seedlot)
seedlot emmean SE df lower.CL upper.CL30.6 0.473 7 29.5 31.7
SO 28.7 0.473 7 27.6 29.8
P
: block
Results are averaged over the levels of: 0.95
Confidence level used
emmip(object = fmtab2.5, formula = ~ seedlot) +
theme_classic()