Exam4.3 {eda4treeR} R Documentation

## Example 4.3 from Experimental Design & Analysis for Tree Improvement

### Description

Exam4.3 presents the germination count data for 4 Pre-Treatments and 6 Seedlots.

### Author(s)

2. Sami Ullah (samiullahuos@gmail.com)

### References

1. Williams, E.R., Matheson, A.C. and Harwood, C.E. (2002).Experimental Design and Analysis for Tree Improvement. CSIRO Publishing.

DataExam4.3

### Examples

data(DataExam4.3)
library(tidyverse)
library(ggplot2)
fm4.2    <- aov(
formula     = Percent~Replication +Contcomp + SeedLot + Pretreatment/Contcomp+
Contcomp /SeedLot + Pretreatment/ Contcomp/SeedLot
, data      = DataExam4.3
#, subset
#, weights
#, na.action
, method      = "qr"
, model       = TRUE
, x           = FALSE
, y           = FALSE
, qr          = TRUE
, singular.ok = TRUE
, contrasts   = NULL
)
anova(fm4.2)

DataExam4.3 %>%
dplyr::group_by(Contcomp) %>%
dplyr::summarize(Mean=mean(Percent),n=length(Percent))
DataExam4.3 %>%
dplyr::group_by(Contcomp,Pretreatment) %>%
dplyr::summarize(Mean=mean(Percent),n=length(Percent))
DataExam4.3 %>%
dplyr::group_by(SeedLot) %>%
dplyr::summarize(Mean=mean(Percent))
DataExam4.3 %>%
dplyr::group_by(Contcomp,SeedLot) %>%
dplyr::summarize(Mean=mean(Percent))
DataExam4.3 %>%
dplyr::group_by(Pretreatment,Contcomp,SeedLot) %>%
dplyr::summarize(Mean=mean(Percent))
RESFIT <- data.frame(residualvalue=residuals(fm4.2),fittedvalue=fitted.values(fm4.2))
ggplot(RESFIT,aes(x=fittedvalue,y=residualvalue))+
geom_point(size=2)+
labs(x="Residual vs Fitted Values",y="")+
theme_bw()

fm4.4 <- aov(
formula = Percent~Replication+Pretreatment*SeedLot
, data     = DataExam4.3
, subset   = Contcomp=="Treated"
#, weights
#, na.action
, method = "qr"
, model = TRUE
, x = FALSE
, y = FALSE
, qr = TRUE
, singular.ok = TRUE
, contrasts = NULL
)
anova(fm4.4)
DataExam4.3%>%group_by(Pretreatment)%>%summarize(Mean=mean(Percent))
DataExam4.3%>%group_by(SeedLot)%>%summarize(Mean=mean(Percent))
DataExam4.3%>%group_by(Pretreatment,SeedLot)%>%summarize(Mean=mean(Percent))



[Package eda4treeR version 0.3.0 Index]