SNK.test: Student-Newman-Keuls (SNK)

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/SNK.test.R

Description

SNK is derived from Tukey, but it is less conservative (finds more differences). Tukey controls the error for all comparisons, where SNK only controls for comparisons under consideration. The level by alpha default is 0.05.

Usage

1
SNK.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

Details

It is necessary first makes a analysis of variance.

Value

statistics

Statistics of the model

parameters

Design parameters

snk

Critical Range Table

means

Statistical summary of the study variable

comparison

Comparison between treatments

groups

Formation of treatment groups

Author(s)

Felipe de Mendiburu

References

1. Principles and procedures of statistics a biometrical approach Steel & Torry & Dickey. Third Edition 1997
2. Multiple comparisons theory and methods. Departament of statistics the Ohio State University. USA, 1996. Jason C. Hsu. Chapman Hall/CRC.

See Also

BIB.test, DAU.test, duncan.test, durbin.test, friedman, HSD.test, kruskal, LSD.test, Median.test, PBIB.test, REGW.test, scheffe.test, waerden.test, waller.test, plot.group

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(agricolae)
data(sweetpotato)
model<-aov(yield~virus,data=sweetpotato)
out <- SNK.test(model,"virus", console=TRUE, 
main="Yield of sweetpotato. Dealt with different virus")
print(SNK.test(model,"virus", group=FALSE))
# version old SNK.test()
df<-df.residual(model)
MSerror<-deviance(model)/df
out <- with(sweetpotato,SNK.test(yield,virus,df,MSerror, group=TRUE))
print(out$groups)

Example output

Study: Yield of sweetpotato. Dealt with different virus

Student Newman Keuls Test
for yield 

Mean Square Error:  22.48917 

virus,  means

      yield      std r  Min  Max
cc 24.40000 3.609709 3 21.7 28.5
fc 12.86667 2.159475 3 10.6 14.9
ff 36.33333 7.333030 3 28.0 41.8
oo 36.90000 4.300000 3 32.1 40.4

alpha: 0.05 ; Df Error: 8 

Critical Range
        2         3         4 
 8.928965 11.064170 12.399670 

Means with the same letter are not significantly different.

Groups, Treatments and means
a 	 oo 	 36.9 
a 	 ff 	 36.33 
b 	 cc 	 24.4 
c 	 fc 	 12.87 
$statistics
    Mean      CV  MSerror
  27.625 17.1666 22.48917

$parameters
  Df ntr alpha test name.t
   8   4  0.05  SNK  virus

$SNK
     Table CriticalRange
2 3.261182      8.928965
3 4.041036     11.064170
4 4.528810     12.399670

$means
      yield      std r  Min  Max
cc 24.40000 3.609709 3 21.7 28.5
fc 12.86667 2.159475 3 10.6 14.9
ff 36.33333 7.333030 3 28.0 41.8
oo 36.90000 4.300000 3 32.1 40.4

$comparison
       Difference pvalue sig.        LCL        UCL
cc-fc  11.5333333 0.0176    *   2.604368  20.462299
cc-ff -11.9333333 0.0151    * -20.862299  -3.004368
cc-oo -12.5000000 0.0291    * -23.564170  -1.435830
fc-ff -23.4666667 0.0008  *** -34.530836 -12.402497
fc-oo -24.0333333 0.0012   ** -36.433003 -11.633664
ff-oo  -0.5666667 0.8873       -9.495632   8.362299

$groups
NULL

  trt    means M
1  oo 36.90000 a
2  ff 36.33333 a
3  cc 24.40000 b
4  fc 12.86667 c

agricolae documentation built on Sept. 13, 2017, 1:03 a.m.