Learn R Programming

agricolae (version 1.1-5)

duncan.test: Duncan's new multiple range test

Description

This test is adapted from the Newman-Keuls method. Duncan's test does not control family wise error rate at the specified alpha level. It has more power than the other post tests, but only because it doesn't control the error rate properly. The Experimentwise Error Rate at: 1-(1-alpha)^(a-1); where "a" is the number of means and is the Per-Comparison Error Rate. Duncan's procedure is only very slightly more conservative than LSD. The level by alpha default is 0.05.

Usage

duncan.test(y, trt, DFerror, MSerror, alpha = 0.05, group=TRUE, main = NULL,console=FALSE)

Arguments

y
model(aov or lm) or answer of the experimental unit
trt
Constant( only y=model) or vector treatment applied to each experimental unit
DFerror
Degree free
MSerror
Mean Square Error
alpha
Significant level
group
TRUE or FALSE
main
Title
console
logical, print output

Value

  • yclass (aov or lm) or vector numeric
  • trtconstant (only y=model) or vector alfanumeric
  • DFerrorNumeric
  • MSerrorNumeric
  • alphaNumeric
  • groupLogic
  • mainText

Details

It is necessary first makes a analysis of variance.

References

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

See Also

LSD.test, waller.test, HSD.test, SNK.test

Examples

Run this code
library(agricolae)
data(sweetpotato)
model<-aov(yield~virus,data=sweetpotato)
comparison <- duncan.test(model,"virus", 
main="Yield of sweetpotato. Dealt with different virus")
duncan.test(model,"virus",alpha=0.01,console=TRUE)
# version old duncan.test()
attach(sweetpotato)
df<-df.residual(model)
MSerror<-deviance(model)/df
comparison <- duncan.test(yield,virus,df,MSerror, group=TRUE)
print(comparison$groups)
detach(sweetpotato)

Run the code above in your browser using DataLab