Function of the AgroR package for joint analysis of experiments conducted in a randomized qualitative or quantitative single-block design with balanced data.

conjdbc(
  trat,
  block,
  local,
  response,
  transf = 1,
  norm = "sw",
  homog = "bt",
  homog.value = 7,
  theme = theme_classic(),
  mcomp = "tukey",
  quali = TRUE,
  alpha.f = 0.05,
  alpha.t = 0.05,
  grau = NA,
  ylab = "response",
  title = "",
  xlab = "",
  fill = "lightblue",
  angulo = 0,
  textsize = 12,
  dec = 3,
  family = "sans",
  errorbar = TRUE
)

Arguments

trat

Numerical or complex vector with treatments

block

Numerical or complex vector with blocks

local

Numeric or complex vector with locations or times

response

Numerical vector containing the response of the experiment.

transf

Applies data transformation (default is 1; for log consider 0)

norm

Error normality test (default is Shapiro-Wilk)

homog

Homogeneity test of variances (default is Bartlett)

homog.value

Reference value for homogeneity of experiments. By default, this ratio should not be greater than 7

theme

ggplot2 theme (default is theme_classic())

mcomp

Multiple comparison test (Tukey (default), LSD, Scott-Knott and Duncan)

quali

Defines whether the factor is quantitative or qualitative (default is qualitative)

alpha.f

Level of significance of the F test (default is 0.05)

alpha.t

Significance level of the multiple comparison test (default is 0.05)

grau

Degree of polynomial in case of quantitative factor (default is 1)

ylab

Variable response name (Accepts the expression() function)

title

Graph title

xlab

Treatments name (Accepts the expression() function)

fill

Defines chart color (to generate different colors for different treatments, define fill = "trat")

angulo

x-axis scale text rotation

textsize

Font size

dec

Number of cells

family

Font family

errorbar

Plot the standard deviation bar on the graph (In the case of a segment and column graph) - default is TRUE

Value

Returns the assumptions of the analysis of variance, the assumption of the joint analysis by means of a QMres ratio matrix, the analysis of variance, the multiple comparison test or regression.

Note

In this function there are three possible outcomes. When the ratio between the experiments is greater than 7, the separate analyzes are returned, without however using the square of the joint residue. When the ratio is less than 7, but with significant interaction, the effects are tested using the square of the joint residual. When there is no significant interaction and the ratio is less than 7, the joint analysis between the experiments is returned.

The ordering of the graph is according to the sequence in which the factor levels are arranged in the data sheet. The bars of the column and segment graphs are standard deviation.

In the final output when transformation (transf argument) is different from 1, the columns resp and respo in the mean test are returned, indicating transformed and non-transformed mean, respectively.

References

Ferreira, P. V. Estatistica experimental aplicada a agronomia. Edufal, 2018.

Principles and procedures of statistics a biometrical approach Steel, Torry and Dickey. Third Edition 1997

Multiple comparisons theory and methods. Departament of statistics the Ohio State University. USA, 1996. Jason C. Hsu. Chapman Hall/CRC.

Practical Nonparametrics Statistics. W.J. Conover, 1999

Ramalho M.A.P., Ferreira D.F., Oliveira A.C. 2000. Experimentacao em Genetica e Melhoramento de Plantas. Editora UFLA.

Scott R.J., Knott M. 1974. A cluster analysis method for grouping mans in the analysis of variance. Biometrics, 30, 507-512.

Author

Gabriel Danilo Shimizu, shimizu@uel.br

Leandro Simoes Azeredo Goncalves

Rodrigo Yudi Palhaci Marubayashi

Examples

library(AgroR)
data(mirtilo)

#===================================
# No significant interaction
#===================================
with(mirtilo, conjdbc(trat, bloco, exp, resp))
#> Warning: Error() model is singular
#> 
#> -----------------------------------------------------------------
#> Normality of errors
#> -----------------------------------------------------------------
#>                          Method Statistic   p.value
#>  Shapiro-Wilk normality test(W) 0.9812789 0.7876433
#> 
#> As the calculated p-value is greater than the 5% significance level, hypothesis H0 is not rejected. Therefore, errors can be considered normal
#> -----------------------------------------------------------------
#> Homogeneity of Variances
#> -----------------------------------------------------------------
#>                               Method Statistic   p.value
#>  Bartlett test(Bartlett's K-squared)  1.094921 0.5784169
#> 
#> As the calculated p-value is greater than the 5% significance level, hypothesis H0 is not rejected. Therefore, the variances can be considered homogeneous
#> -----------------------------------------------------------------
#> Independence from errors
#> -----------------------------------------------------------------
#>                  Method Statistic   p.value
#>  Durbin-Watson test(DW)  2.377661 0.4700462
#> 
#> As the calculated p-value is greater than the 5% significance level, hypothesis H0 is not rejected. Therefore, errors can be considered independent
#> -----------------------------------------------------------------
#> Test Homogeneity of experiments
#> -----------------------------------------------------------------
#> [1] 5.481481
#> 
#> Based on the analysis of variance and homogeneity of experiments, it can be concluded that: 
#> The experiments can be analyzed together

#> 
#> 

#> 
#> -----------------------------------------------------------------
#> Analysis of variance
#> -----------------------------------------------------------------
#>                 Df     Sum Sq    Mean Sq    F value      Pr(>F)
#> Trat             2 14434.7222 7217.36111 45.9867257 0.001737072
#> Exp              2  4809.7222 2404.86111 15.3230088 0.013329484
#> Block/Local      6   362.5000   60.41667  0.3849558 0.857661006
#> Exp:Trat         4   627.7778  156.94444  0.7730901 0.556825561
#> Average residue 18  3654.1667  203.00926                       
#> 
#> -----------------------------------------------------------------
#> Multiple Comparison Test: Tukey HSD 
#> -----------------------------------------------------------------
#>        resp groups
#> 18 72.91667      a
#> 12 68.33333      a
#> 6  28.33333      b

#===================================
# Significant interaction
#===================================
data(eucalyptus)
with(eucalyptus, conjdbc(trati, bloc, exp, resp))
#> Warning: Error() model is singular
#> 
#> -----------------------------------------------------------------
#> Normality of errors
#> -----------------------------------------------------------------
#>                          Method Statistic   p.value
#>  Shapiro-Wilk normality test(W) 0.9838179 0.4835598
#> 
#> As the calculated p-value is greater than the 5% significance level, hypothesis H0 is not rejected. Therefore, errors can be considered normal
#> -----------------------------------------------------------------
#> Homogeneity of Variances
#> -----------------------------------------------------------------
#>                               Method Statistic   p.value
#>  Bartlett test(Bartlett's K-squared) 0.4788843 0.9928761
#> 
#> As the calculated p-value is greater than the 5% significance level, hypothesis H0 is not rejected. Therefore, the variances can be considered homogeneous
#> -----------------------------------------------------------------
#> Independence from errors
#> -----------------------------------------------------------------
#>                  Method Statistic   p.value
#>  Durbin-Watson test(DW)  2.590588 0.7295125
#> 
#> As the calculated p-value is greater than the 5% significance level, hypothesis H0 is not rejected. Therefore, errors can be considered independent
#> -----------------------------------------------------------------
#> Test Homogeneity of experiments
#> -----------------------------------------------------------------
#> [1] 2.635549
#> 
#> Based on the analysis of variance and homogeneity of experiments, it can be concluded that: 
#> Experiments cannot be analyzed together (Separate by experiment)

#> 
#> 

#> 
#> -----------------------------------------------------------------
#> Analysis of variance
#> -----------------------------------------------------------------
#>                 Df     Sum Sq    Mean Sq    F value       Pr(>F)
#> Trat             5  135.15111  27.030222  3.5300682 4.246447e-02
#> Exp              2 1490.94528 745.472639 97.3565518 2.781453e-07
#> Block/Local      6   38.78472   6.464120  0.8441953 5.639987e-01
#> Exp:Trat        10   76.57139   7.657139  2.5596319 1.530346e-02
#> Average residue 45  134.61750   2.991500                        
#> 
#> -----------------------------------------------------------------
#> $`Exp 1`
#>                  Df      Sum Sq     Mean.Sq    F value       Pr(F)
#> Trat              5  53.5033333 10.70066667 3.57702379 0.008285007
#> Block             3   0.1483333  0.04944444 0.01652831 0.997061685
#> Average Residual 45 134.6175000  2.99150000                       
#> 
#> $`Exp 2`
#>                  Df    Sum Sq  Mean.Sq  F value       Pr(F)
#> Trat              5  52.16208 10.43242 3.487353 0.009506374
#> Block             3  60.19792 20.06597 6.707662 0.000773219
#> Average Residual 45 134.61750  2.99150                     
#> 
#> $`Exp 3`
#>                  Df    Sum Sq  Mean.Sq    F value        Pr(F)
#> Trat              5 106.05708 21.21142 7.09056215 5.797267e-05
#> Block             3   0.64125  0.21375 0.07145245 9.749323e-01
#> Average Residual 45 134.61750  2.99150                        
#> 
#> 
#> -----------------------------------------------------------------
#> Multiple Comparison Test: Tukey HSD 
#> -----------------------------------------------------------------
#> $`Exp 1`
#>      resp1 groups
#> T 1 20.625     ab
#> T 2 19.050      b
#> T 3 23.025      a
#> T 4 22.500     ab
#> T 5 21.950     ab
#> T 6 19.500     ab
#> 
#> $`Exp 2`
#>      resp1 groups
#> T 1  9.775      b
#> T 2 12.025     ab
#> T 3 14.000      a
#> T 4 12.975     ab
#> T 5 14.125      a
#> T 6 11.975     ab
#> 
#> $`Exp 3`
#>      resp1 groups
#> T 1 22.250      b
#> T 2 21.375      b
#> T 3 21.250      b
#> T 4 24.175     ab
#> T 5 27.025      a
#> T 6 21.350      b
#>