Exam4.3 | R Documentation |
Exam4.3 presents the germination count data for 4 Pre-Treatments and 6 Seedlots.
Muhammad Yaseen (myaseen208@gmail.com)
Sami Ullah (samiullahuos@gmail.com)
E.R. Williams, C.E. Harwood and A.C. Matheson (2023). Experimental Design and Analysis for Tree Improvement. CSIRO Publishing (https://www.publish.csiro.au/book/3145/).
DataExam4.3
library(car)
library(dae)
library(dplyr)
library(emmeans)
library(ggplot2)
library(lmerTest)
library(magrittr)
library(predictmeans)
data(DataExam4.3)
# Pg. 50
fm4.2 <-
aov(
formula =
percent ~ repl + contcomp + seedlot +
treat/contcomp + contcomp/seedlot +
treat/contcomp/seedlot
, data = DataExam4.3
)
# Pg. 54
anova(fm4.2)
# Pg. 54
model.tables(x = fm4.2, type = "means")
emmeans(object = fm4.2, specs = ~ contcomp)
emmeans(object = fm4.2, specs = ~ seedlot)
emmeans(object = fm4.2, specs = ~ contcomp + treat)
emmeans(object = fm4.2, specs = ~ contcomp + seedlot)
emmeans(object = fm4.2, specs = ~ contcomp + treat + seedlot)
DataExam4.3 %>%
dplyr::group_by(treat, contcomp, seedlot) %>%
dplyr::summarize(Mean = mean(percent))
RESFIT <-
data.frame(
residualvalue = residuals(fm4.2)
, fittedvalue = fitted.values(fm4.2)
)
ggplot(mapping = aes(
x = fitted.values(fm4.2)
, y = residuals(fm4.2))) +
geom_point(size = 2) +
labs(
x = "Fitted Values"
, y = "Residuals"
) +
theme_classic()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.