Exam8.2 presents the Diameter at breast height (Dbh) of 60 SeedLots under layout of row column design with 6 rows and 10 columns in 18 countries and 59 provinces of 18 selected countries.

References

  1. 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/).

See also

Author

  1. Muhammad Yaseen (myaseen208@gmail.com)

  2. Sami Ullah (samiullahuos@gmail.com)

Examples

library(car)
library(dae)
library(dplyr)
library(emmeans)
library(ggplot2)
library(lmerTest)
library(magrittr)
library(predictmeans)
library(supernova)

data(DataExam8.2)

# Pg.
fm8.2  <-
  lmer(
    formula = dbhmean ~ Repl + Column + Contcompf + Contcompf:Standard +
              (1|Repl:Row ) + (1|Repl:Column ) + (1|Contcompv:Clone)
  , data    = DataExam8.2
    )
#> fixed-effect model matrix is rank deficient so dropping 5 columns / coefficients
#\dontrun{
varcomp(fm8.2)
#> Warning: numerical expression has 300 elements: only the first used
#> Warning: numerical expression has 300 elements: only the first used
#> Warning: numerical expression has 300 elements: only the first used
#> Warning: numerical expression has 300 elements: only the first used
#> Computing profile confidence intervals ...
#>                               vcov     SE  2.5 % 97.5 %
#> Contcompv:Clone.(Intercept) 0.4950 0.1126 0.3057 0.7422
#> Repl:Row.(Intercept)        0.0802 0.0351 0.0173 0.1458
#> Repl:Column.(Intercept)     0.0529 0.0326 0.0000 0.0783
#> residual                    0.3992 0.0435 0.3245 0.5024
#}
anova(fm8.2)
#> Missing cells for: Contcompf0:Standard0, Contcompf1:StandardUG323, Contcompf1:StandardU6, Contcompf1:StandardPN14, Contcompf1:StandardSSOseed.  
#> Interpret type III hypotheses with care.
#> Type III Analysis of Variance Table with Satterthwaite's method
#>                     Sum Sq Mean Sq NumDF   DenDF F value          Pr(>F)    
#> Repl                3.2720  0.8180     4  26.467  2.0489       0.1162606    
#> Column              3.1018  0.6204     5  19.545  1.5539       0.2194719    
#> Contcompf           5.3203  5.3203     1  54.905 13.3265       0.0005845 ***
#> Contcompf:Standard 20.6587  6.8862     3 207.152 17.2488 0.0000000004896 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Anova(fm8.2, type = "II", test.statistic = "Chisq")
#> Analysis of Deviance Table (Type II Wald chisquare tests)
#> 
#> Response: dbhmean
#>                      Chisq Df Pr(>Chisq)    
#> Repl                8.1957  4    0.08467 .  
#> Column              7.7694  5    0.16941    
#> Contcompf           4.6841  1    0.03044 *  
#> Contcompf:Standard 51.7463  3  3.392e-11 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

predictmeans(model = fm8.2, modelterm = "Repl")
#> Warning: Missing treatments' combination appeared, predicted means maybe misleading!
#> Warning: Missing treatments' combination appeared, predicted means maybe misleading!
#> $`Predicted Means`
#> Repl
#>      1      2      3      4      5 
#> 7.8926 8.2070 8.3429 8.4604 8.5464 
#> 
#> $`Standard Error of Means`
#> Repl
#>       1       2       3       4       5 
#> 0.33123 0.33126 0.32992 0.32992 0.32992 
#> 
#> $`Standard Error of Differences`
#>   Max.SED   Min.SED  Aveg.SED 
#> 0.2239675 0.2167320 0.2196681 
#> 
#> $LSD
#>  Max.LSD  Min.LSD Aveg.LSD 
#>  0.44792  0.43345  0.43932 
#> attr(,"Significant level")
#> [1] 0.05
#> attr(,"Degree of freedom")
#> [1] 60.56
#> 
#> $mean_table
#>   Repl   Mean      SE       Df LL(95%) UL(95%)
#> 1    1 7.8926 0.33123 60.55892  7.2302  8.5551
#> 2    2 8.2070 0.33126 60.55892  7.5445  8.8695
#> 3    3 8.3429 0.32992 60.55892  7.6831  9.0027
#> 4    4 8.4604 0.32992 60.55892  7.8006  9.1202
#> 5    5 8.5464 0.32992 60.55892  7.8866  9.2062
#> 
predictmeans(model = fm8.2, modelterm = "Column")
#> Warning: Missing treatments' combination appeared, predicted means maybe misleading!
#> Warning: Missing treatments' combination appeared, predicted means maybe misleading!
#> $`Predicted Means`
#> Column
#>      1      2      3      4      5      6 
#> 8.2214 8.4708 8.3779 7.9721 7.8166 8.7141 
#> 
#> $`Standard Error of Means`
#> Column
#>       1       2       3       4       5       6 
#> 0.31662 0.39168 0.39315 0.26648 0.26646 0.31653 
#> 
#> $`Standard Error of Differences`
#>   Max.SED   Min.SED  Aveg.SED 
#> 0.2714760 0.2102583 0.2373610 
#> 
#> $LSD
#>  Max.LSD  Min.LSD Aveg.LSD 
#>  0.54413  0.42143  0.47575 
#> attr(,"Significant level")
#> [1] 0.05
#> attr(,"Degree of freedom")
#> [1] 54.65
#> 
#> $mean_table
#>   Column   Mean      SE       Df LL(95%) UL(95%)
#> 1      1 8.2214 0.31662 54.64679  7.5868  8.8561
#> 2      2 8.4708 0.39168 54.64679  7.6857  9.2558
#> 3      3 8.3779 0.39315 54.64679  7.5900  9.1659
#> 4      4 7.9721 0.26648 54.64679  7.4380  8.5063
#> 5      5 7.8166 0.26646 54.64679  7.2825  8.3507
#> 6      6 8.7141 0.31653 54.64679  8.0797  9.3486
#> 
library(emmeans)
emmeans(object = fm8.2, specs = ~Contcompf|Standard)
#> NOTE: A nesting structure was detected in the fitted model:
#>     Standard %in% Contcompf
#> Contcompf = 1, Standard = 0:
#>  emmean    SE   df lower.CL upper.CL
#>    8.91 0.117 65.9     8.67     9.14
#> 
#> Contcompf = 0, Standard = UG323:
#>  emmean    SE   df lower.CL upper.CL
#>    8.97 0.770 55.6     7.43    10.51
#> 
#> Contcompf = 0, Standard = U6:
#>  emmean    SE   df lower.CL upper.CL
#>    6.55 0.770 55.5     5.01     8.10
#> 
#> Contcompf = 0, Standard = PN14:
#>  emmean    SE   df lower.CL upper.CL
#>    7.70 0.771 55.8     6.16     9.25
#> 
#> Contcompf = 0, Standard = SSOseed:
#>  emmean    SE   df lower.CL upper.CL
#>    6.08 0.770 55.5     4.54     7.63
#> 
#> Results are averaged over the levels of: Repl, Column 
#> Degrees-of-freedom method: kenward-roger 
#> Confidence level used: 0.95