split plot model anova with R

Viewed 382

I am trying to solve an exercise with R, that I found in the book Design of Experiments for Agriculture and the Natural Sciences(pag. 164) table

I have passed the table to the R software

library(tibble)
tb = tibble("replica" = factor(x = rep(1:4,12), labels = c("I","II","III","IV")),
            "row" = factor(x = rep(1:4,c(12,12,12,12)), labels = c("12P","25P","12B","25B")),
            "hybrid" = factor(x = rep(1:2,c(24,24)), labels = c("P3730","B70XH55")),
            "density" = factor(x = c(rep(1:3,c(4,4,4)),rep(1:3,c(4,4,4)), rep(1:3,c(4,4,4)), rep(1:3,c(4,4,4))  ),
                         labels = c("12000","16000","20000")),
            "valor" = c(140,138,130,142,
                        145,146,150,147,
                        150,149,146,150,
                        136,132,134,138,
                        140,134,136,140,
                        145,138,138,142,
                        142,132,128,140,
                        146,136,140,141,
                        148,140,142,140,
                        132,130,136,134,
                        138,132,130,132,
                        140,134,130,136))

but i have difficulty creating aov model

model = aov(valor ~ replica + hybrid + replica/hybrid + row + replica/row + density + replica/density + row:density ,data = tb)

when applying anova(model), it gives me discordant result with the table below

enter image description here

If there is any other way to apply the model, please I am all ear to your answers. I apply anova() for the reason that I can extract the msres anova(model)['Residuals', 'Mean Sq'] and that helps me calculate the reliability of the model (cv)

1 Answers

I think the output is obtained using ssp.plot from the agricolae library, but first you need to convert the row spacing to a continuous variable:

tb$row = as.numeric(gsub("[A-Z]*","",as.character(tb$row)))

library(agricolae)

with(tb,ssp.plot(replica,hybrid,row,density,Y=valor))

ANALYSIS SPLIT-SPLIT PLOT:  valor 
Class level information

hybrid  :  P3730 B70XH55 
row     :  12 25 
density     :  12000 16000 20000 
replica     :  I II III IV 

Number of observations:  48 

Analysis of Variance Table

Response: valor
                   Df Sum Sq Mean Sq F value    Pr(>F)    
replica             3 237.73   79.24  7.0135 0.0719692 .  
hybrid              1 238.52  238.52 21.1106 0.0193734 *  
Ea                  3  33.90   11.30                      
row                 1 475.02  475.02 71.6262 0.0001487 ***
hybrid:row          1   1.69    1.69  0.2545 0.6319437    
Eb                  6  39.79    6.63                      
density             2 350.04  175.02 19.9233 7.959e-06 ***
density:hybrid      2  37.04   18.52  2.1083 0.1433767    
density:row         2  87.79   43.90  4.9968 0.0153376 *  
density:hybrid:row  2   1.63    0.81  0.0925 0.9119816    
Ec                 24 210.83    8.78                      
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

cv(a) = 2.4 %, cv(b) = 1.9 %, cv(c) = 2.1 %, Mean = 138.8542
Related