FAT2DBC.ad.Rd
Analysis of an experiment conducted in a randomized block design in a double factorial scheme using analysis of variance of fixed effects.
FAT2DBC.ad(
f1,
f2,
block,
response,
responseAd,
norm = "sw",
homog = "bt",
alpha.f = 0.05,
alpha.t = 0.05,
quali = c(TRUE, TRUE),
mcomp = "tukey",
grau = c(NA, NA),
grau12 = NA,
grau21 = NA,
transf = 1,
constant = 0,
geom = "bar",
theme = theme_classic(),
ylab = "Response",
xlab = "",
xlab.factor = c("F1", "F2"),
legend = "Legend",
ad.label = "Additional",
color = "rainbow",
fill = "lightblue",
textsize = 12,
labelsize = 4,
addmean = TRUE,
errorbar = TRUE,
CV = TRUE,
dec = 3,
width.column = 0.9,
width.bar = 0.3,
angle = 0,
posi = "right",
family = "sans",
point = "mean_sd",
sup = NA,
ylim = NA,
angle.label = 0
)
Numeric or complex vector with factor 1 levels
Numeric or complex vector with factor 2 levels
Numeric or complex vector with repetitions
Numerical vector containing the response of the experiment.
Numerical vector with additional treatment responses
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 (qualitative)
Multiple comparison test (Tukey (default), LSD and Duncan)
Polynomial degree in case of quantitative factor (default is 1). Provide a vector with two elements.
Polynomial degree in case of quantitative factor (default is 1). Provide a vector with n levels of factor 2, in the case of interaction f1 x f2 and qualitative factor 2 and quantitative factor 1.
Polynomial degree in case of quantitative factor (default is 1). Provide a vector with n levels of factor 1, in the case of interaction f1 x f2 and qualitative factor 1 and quantitative factor 2.
Applies data transformation (default is 1; for log consider 0; `angular` for angular transformation)
Add a constant for transformation (enter value)
Graph type (columns or segments (For simple effect only))
ggplot2 theme (default is theme_classic())
Variable response name (Accepts the expression() function)
Treatments name (Accepts the expression() function)
Provide a vector with two observations referring to the x-axis name of factors 1 and 2, respectively, when there is an isolated effect of the factors. This argument uses `parse`.
Legend title name
Aditional label
Column chart color (default is "rainbow")
Defines chart color (to generate different colors for different treatments, define fill = "trat")
Font size
Label Size
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
Plotting the coefficient of variation and p-value of Anova (default is TRUE)
Number of cells
Width column if geom="bar"
Width errorbar
x-axis scale text rotation
legend position
Font family
This function defines whether the point must have all points ("all"), mean ("mean"), standard deviation (default - "mean_sd") or mean with standard error ("mean_se") if quali= FALSE. For quali=TRUE, `mean_sd` and `mean_se` change which information will be displayed in the error bar.
Number of units above the standard deviation or average bar on the graph
y-axis scale
label angle
The table of analysis of variance, the test of normality of errors (Shapiro-Wilk, Lilliefors, Anderson-Darling, Cramer-von Mises, Pearson and Shapiro-Francia), the test of homogeneity of variances (Bartlett or Levene), the test of independence of Durbin-Watson errors, the test of multiple comparisons (Tukey, LSD, Scott-Knott or Duncan) or adjustment of regression models up to grade 3 polynomial, in the case of quantitative treatments. The column chart for qualitative treatments is also returned.
The order of the chart follows the alphabetical pattern. Please use `scale_x_discrete` from package ggplot2, `limits` argument to reorder x-axis. The bars of the column and segment graphs are standard deviation.
The function does not perform multiple regression in the case of two quantitative factors.
The assumptions of variance analysis disregard additional treatment
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.
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.
library(AgroR)
data(cloro)
respAd=c(268, 322, 275, 350, 320)
with(cloro, FAT2DBC.ad(f1, f2, bloco, resp, respAd, ylab="Number of nodules", legend = "Stages"))
#>
#> -----------------------------------------------------------------
#> Normality of errors
#> -----------------------------------------------------------------
#> Method Statistic p.value
#> Shapiro-Wilk normality test(W) 0.9548911 0.1117923
#>
#> 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) 16.11086 0.02412261
#>
#> As the calculated p-value is less than the 5% significance level, H0 is rejected. Therefore, the variances are not homogeneous
#>
#> -----------------------------------------------------------------
#> Independence from errors
#> -----------------------------------------------------------------
#> Method Statistic p.value
#> Durbin-Watson test(DW) 2.047899 0.1769663
#>
#> As the calculated p-value is greater than the 5% significance level, hypothesis H0 is not rejected. Therefore, errors can be considered independent
#>
#> -----------------------------------------------------------------
#> Additional Information
#> -----------------------------------------------------------------
#>
#> CV (%) = 28.29
#> Mean Factorial = 218.35
#> Median Factorial = 185
#> Mean Aditional = 307
#> Median Aditional = 320
#> Possible outliers = No discrepant point
#>
#> -----------------------------------------------------------------
#> Analysis of Variance
#> -----------------------------------------------------------------
#> Df Sum Sq Mean.Sq F value Pr(F)
#> Fator1 1 16160.400 16160.400 3.8772062 5.765683e-02
#> Fator2 3 116554.500 38851.500 9.3212591 1.409219e-04
#> block 4 7122.311 1780.578 0.4271966 7.878578e-01
#> Fator1:Fator2 3 452096.200 150698.733 36.1556682 2.154175e-10
#> Ad x Factorial 1 34928.100 34928.100 8.3799563 6.781309e-03
#> Residuals 32 133377.689 4168.053
#>
#>
#> Your analysis is not valid, suggests using a non-parametric test and try to transform the data
#>
#> -----------------------------------------------------------------
#> Significant interaction: analyzing the interaction
#> -----------------------------------------------------------------
#> Df Sum Sq Mean Sq F value Pr(>F)
#> Fator2 3 116554 38851 9.3213 0.0001409 ***
#> block 4 11614 2903 0.6966 0.5999233
#> Fator2:Fator1 4 468257 117064 28.0861 4.580e-10 ***
#> Fator2:Fator1: Plantio 1 26112 26112 6.2648 0.0176146 *
#> Fator2:Fator1: R1+15 1 70896 70896 17.0095 0.0002467 ***
#> Fator2:Fator1: V1+15 1 258888 258888 62.1125 5.419e-09 ***
#> Fator2:Fator1: V3+15 1 112360 112360 26.9574 1.137e-05 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> -----------------------------------------------------------------
#> Analyzing F2 inside of the level of F1
#> -----------------------------------------------------------------
#>
#> Df Sum Sq Mean Sq F value Pr(>F)
#> Fator1 1 16160 16160 3.8772 0.057657 .
#> block 4 11614 2903 0.6966 0.599923
#> Fator1:Fator2 6 568651 94775 22.7385 2.974e-10 ***
#> Fator1:Fator2: IN 3 75470 25157 6.0356 0.002232 **
#> Fator1:Fator2: NI 3 493181 164394 39.4414 7.343e-11 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> -----------------------------------------------------------------
#> Final table
#> -----------------------------------------------------------------
#> Plantio R1+15 V1+15 V3+15
#> IN 272.8 aA 236.6 aAB 140.4 bB 304.0 aA
#> NI 170.6 bB 68.2 bB 462.2 aA 92.0 bB
#>
#>
#> Averages followed by the same lowercase letter in the column and
#> uppercase in the row do not differ by the tukey (p< 0.05 )