Exam4.4 {eda4treeR}R Documentation

Example 4.4 from Experimental Design & Analysis for Tree Improvement

Description

Exam4.4 presents the height means for 4 seedlots under factorial arrangement for two levels of Fertilizer and two levels of Irrigation.

Author(s)

  1. Muhammad Yaseen (myaseen208@gmail.com)

  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.

See Also

DataExam4.4

Examples

data(DataExam4.4)
library(tidyverse)
library(ggplot2)
library(dae)

fm4.6    <- aov(
      formula     = Height~Rep+Irrig*Ferti*SeedDLot+Error(Rep/Irrig:Ferti)
    , data        = DataExam4.4
    #, subset
    #, weights
    #, na.action
    , method      = "qr"
    , model       = TRUE
    , x           = FALSE
    , y           = FALSE
    , qr          = TRUE
    , singular.ok = TRUE
    , contrasts   = NULL
    )
 summary(fm4.6)

    DataExam4.4 %>%
      dplyr::group_by(Irrig) %>%
      dplyr::summarize(Mean=mean(Height))

    DataExam4.4 %>%
      dplyr::group_by(Ferti) %>%
      dplyr::summarize(Mean=mean(Height))

    DataExam4.4 %>%
      dplyr::group_by(SeedDLot) %>%
      dplyr::summarize(Mean=mean(Height))

    DataExam4.4 %>%
      dplyr::group_by(Irrig,Ferti) %>%
      dplyr::summarize(Mean=mean(Height))

    DataExam4.4 %>%
      dplyr::group_by(Irrig,SeedDLot) %>%
      dplyr::summarize(Mean=mean(Height))

    DataExam4.4 %>%
      dplyr::group_by(Ferti,SeedDLot) %>%
      dplyr::summarize(Mean=mean(Height))

    DataExam4.4 %>%
      dplyr::group_by(Irrig,Ferti,SeedDLot) %>%
      dplyr::summarize(Mean=mean(Height))
RESFIT <- data.frame(residualvalue=residuals(fm4.6),fittedvalue=fitted.values(fm4.6))
ggplot(RESFIT,aes(x=fittedvalue,y=residualvalue))+
 geom_point(size=2)+
 labs(x="Residual vs Fitted Values",y="")+
 theme_bw()

[Package eda4treeR version 0.3.0 Index]