This is a function of the AgroR package for statistical analysis of experiments conducted in a randomized block and balanced design with a factor considering the fixed model. The function presents the option to use non-parametric method or transform the dataset.
DBC(
trat,
block,
response,
norm = "sw",
homog = "bt",
alpha.f = 0.05,
alpha.t = 0.05,
quali = TRUE,
mcomp = "tukey",
grau = 1,
transf = 1,
constant = 0,
test = "parametric",
geom = "bar",
theme = theme_classic(),
sup = NA,
CV = TRUE,
ylab = "response",
xlab = "",
textsize = 12,
labelsize = 4,
fill = "lightblue",
angle = 0,
family = "sans",
dec = 3,
width.column = NULL,
width.bar = 0.3,
addmean = TRUE,
errorbar = TRUE,
posi = "top",
point = "mean_sd",
pointsize = 5,
angle.label = 0,
ylim = NA
)
The table of analysis of variance, the test of normality of errors (Shapiro-Wilk ("sw"), Lilliefors ("li"), Anderson-Darling ("ad"), Cramer-von Mises ("cvm"), Pearson ("pearson") and Shapiro-Francia ("sf")), the test of homogeneity of variances (Bartlett ("bt") or Levene ("levene")), the test of independence of Durbin-Watson errors, the test of multiple comparisons (Tukey ("tukey"), LSD ("lsd"), Scott-Knott ("sk") or Duncan ("duncan")) or adjustment of regression models up to grade 3 polynomial, in the case of quantitative treatments. Non-parametric analysis can be used by the Friedman test. The column, segment or box chart for qualitative treatments is also returned. The function also returns a standardized residual plot.
Numerical or complex vector with treatments
Numerical or complex vector with blocks
Numerical vector containing the response of the experiment.
Error normality test (default is Shapiro-Wilk)
Homogeneity test of variances (default is Bartlett)
Level of significance of the F test (default is 0.05)
Significance level of the multiple comparison test (default is 0.05)
Defines whether the factor is quantitative or qualitative (default is qualitative)
Multiple comparison test (Tukey (default), LSD, Scott-Knott and Duncan)
Degree of polynomial in case of quantitative factor (default is 1)
Applies data transformation (default is 1; for log consider 0; `angular` for angular transformation)
Add a constant for transformation (enter value)
"parametric" - Parametric test or "noparametric" - non-parametric test
graph type (columns, boxes or segments)
ggplot2 theme (default is theme_classic())
Number of units above the standard deviation or average bar on the graph
Plotting the coefficient of variation and p-value of Anova (default is TRUE)
Variable response name (Accepts the expression() function)
Treatments name (Accepts the expression() function)
Font size
Label size
Defines chart color (to generate different colors for different treatments, define fill = "trat")
x-axis scale text rotation
Font family
Number of cells
Width column if geom="bar"
Width errorbar
Plot the average value on the graph (default is TRUE)
Plot the standard deviation bar on the graph (In the case of a segment and column graph) - default is TRUE
Legend position
Defines whether to plot mean ("mean"), mean with standard deviation ("mean_sd" - default) or mean with standard error ("mean_se"). For parametric test it is possible to plot the square root of QMres (mean_qmres).
Point size
label angle
Define a numerical sequence referring to the y scale. You can use a vector or the `seq` command.
Gabriel Danilo Shimizu, shimizu@uel.br
Leandro Simoes Azeredo Goncalves
Rodrigo Yudi Palhaci Marubayashi
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.
Mendiburu, F., and de Mendiburu, M. F. (2019). Package ‘agricolae’. R Package, Version, 1-2.
DIC, DQL
library(AgroR)
#=============================
# Example laranja
#=============================
data(laranja)
attach(laranja)
DBC(trat, bloco, resp, mcomp = "sk", angle=45, ylab = "Number of fruits/plants")
#=============================
# Friedman test
#=============================
DBC(trat, bloco, resp, test="noparametric", ylab = "Number of fruits/plants")
#=============================
# Example soybean
#=============================
data(soybean)
with(soybean, DBC(cult, bloc, prod,
ylab=expression("Grain yield"~(kg~ha^-1))))
Run the code above in your browser using DataLab