dunnett.Rd
The function performs the Dunnett test
dunnett(
trat,
resp,
control,
model = "DIC",
block = NA,
column = NA,
line = NA,
alpha.t = 0.05,
pointsize = 5,
pointshape = 21,
linesize = 1,
labelsize = 4,
textsize = 12,
errorsize = 1,
widthsize = 0.2,
label = "Response",
fontfamily = "sans"
)
Numerical or complex vector with treatments
Numerical vector containing the response of the experiment.
Treatment considered control (write identical to the name in the vector)
Experimental design (DIC, DBC or DQL)
Numerical or complex vector with blocks
Numerical or complex vector with columns
Numerical or complex vector with lines
Significance level (default is 0.05)
Point size
Shape
Line size
Label size
Font size
Errorbar size
Width errorbar
Variable label
font family
I return the Dunnett test for experiments in a completely randomized design, randomized blocks or Latin square.
Do not use the "-" symbol or space in treatment names
#====================================================
# complete randomized design
#====================================================
data("pomegranate")
with(pomegranate,dunnett(trat=trat,resp=WL,control="T1"))
#> Estimate IC-lwr IC-upr t value p-value sig
#> T1 - T2 -0.1650 -0.6427072 0.3127072 -0.9528 0.8034 ns
#> T1 - T3 0.7750 0.2972928 1.2527072 4.4753 0.0014 *
#> T1 - T4 0.7775 0.2997928 1.2552072 4.4898 0.0012 *
#> T1 - T5 0.7950 0.3172928 1.2727072 4.5908 0.0010 *
#> T1 - T6 0.3200 -0.1577072 0.7977072 1.8479 0.2668 ns
#====================================================
# randomized block design in factorial double
#====================================================
library(AgroR)
data(cloro)
attach(cloro)
#> The following object is masked from simulate3:
#>
#> resp
#> The following object is masked from simulate1:
#>
#> resp
#> The following object is masked from aristolochia (pos = 5):
#>
#> resp
#> The following objects are masked from simulate2:
#>
#> bloco, resp
#> The following objects are masked from laranja:
#>
#> bloco, resp
#> The following object is masked from aristolochia (pos = 8):
#>
#> resp
#> The following objects are masked from cloro (pos = 9):
#>
#> bloco, f1, f2, resp
#> The following object is masked from passiflora:
#>
#> bloco
respAd=c(268, 322, 275, 350, 320)
a=FAT2DBC.ad(f1, f2, bloco, resp, respAd,
ylab="Number of nodules",
legend = "Stages",mcomp="sk")
#>
#> -----------------------------------------------------------------
#> 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 (%) = 27.38
#> 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.4 16160.400 4.1407431 4.927778e-02
#> Fator2 3 116554.5 38851.500 9.9548327 6.428916e-05
#> block 4 11613.6 2903.400 0.7439317 5.684322e-01
#> Fator1:Fator2 3 452096.2 150698.733 38.6131986 2.411216e-11
#> Ad x Factorial 1 475410.7 475410.700 121.8134178 4.174439e-13
#> Residuals 36 140500.0 3902.778
#>
#>
#> 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.9548 6.429e-05 ***
#> block 4 11614 2903 0.7439 0.5684322
#> Fator2:Fator1 4 468257 117064 29.9951 5.126e-11 ***
#> Fator2:Fator1: Plantio 1 26112 26112 6.6906 0.0138814 *
#> Fator2:Fator1: R1+15 1 70896 70896 18.1656 0.0001393 ***
#> Fator2:Fator1: V1+15 1 258888 258888 66.3343 1.101e-09 ***
#> Fator2:Fator1: V3+15 1 112360 112360 28.7898 4.897e-06 ***
#> ---
#> 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 4.1407 0.049278 *
#> block 4 11614 2903 0.7439 0.568432
#> Fator1:Fator2 6 568651 94775 24.2840 2.774e-11 ***
#> Fator1:Fator2: IN 3 75470 25157 6.4458 0.001317 **
#> Fator1:Fator2: NI 3 493181 164394 42.1222 7.282e-12 ***
#> ---
#> 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 aA 140.4 bB 304.0 aA
#> NI 170.6 bB 68.2 bC 462.2 aA 92.0 bC
#>
#>
#> Averages followed by the same lowercase letter in the column and
#> uppercase in the row do not differ by the sk (p< 0.05 )
data=rbind(data.frame(trat=paste(f1,f2,sep = ""),bloco=bloco,resp=resp),
data.frame(trat=c("Test","Test","Test","Test","Test"),
bloco=unique(bloco),resp=respAd))
with(data,dunnett(trat = trat,
resp = resp,
control = "Test",
block=bloco,model = "DBC"))
#> Estimate IC-lwr IC-upr t value p-value sig
#> Test - INPlantio -34.2 -148.76741 80.36741 -0.8376 0.9479 ns
#> Test - INV1+15 -166.6 -281.16741 -52.03259 -4.0802 0.0020 *
#> Test - INV3+15 -3.0 -117.56741 111.56741 -0.0735 1.0000 ns
#> Test - INR1+15 -70.4 -184.96741 44.16741 -1.7242 0.4040 ns
#> Test - NIPlantio -136.4 -250.96741 -21.83259 -3.3405 0.0137 *
#> Test - NIV1+15 155.2 40.63259 269.76741 3.8010 0.0042 *
#> Test - NIV3+15 -215.0 -329.56741 -100.43259 -5.2655 0.0001 *
#> Test - NIR1+15 -238.8 -353.36741 -124.23259 -5.8484 0.0000 *