Last data update: 2014.03.03

R: Wilcoxon, Nemenyi, McDonald-Thompson
pWNMTR Documentation

Wilcoxon, Nemenyi, McDonald-Thompson

Description

Function to compute the P-value for the observed Wilcoxon, Nemenyi, McDonald-Thompson R statistic.

Usage

pWNMT(x,b=NA,trt=NA,method=NA, n.mc=10000)

Arguments

x

Either a matrix or a vector containing the data.

b

If x is a vector, b is a required vector of block labels. Otherwise, not used.

trt

If x is a vector, trt is a required vector of treatment labels. Otherwise, not used.

method

Either "Exact", "Monte Carlo" or "Asymptotic", indicating the desired distribution. When method=NA, "Exact" will be used if the number of permutations is 10,000 or less. Otherwise, "Monte Carlo" will be used.

n.mc

If method="Monte Carlo", the number of Monte Carlo samples used to estimate the distribution. Otherwise, not used.

Details

The data entry is intended to be flexible, so that the data can be entered in either of two ways. The following are equivalent: pWNMT(x=matrix(c(1,2,3,4,5,6),ncol=2,byrow=T)) pWNMT(x=c(1,2,3,4,5,6),b=c(1,1,2,2,3,3),trt=c(1,2,1,2,1,2))

Value

Returns a list with "NSM3Ch7MCp" class containing the following components:

k

number of treatments

n

number of blocks

obs.stat

the observed R* statistic for each of the k*(k-1)/2 comparisons

p.val

upper tail P-value corresponding to each observed R statistic

Author(s)

Grant Schneider

Examples

##Hollander-Wolfe-Chicken Example 7.3 Rounding First Base
RoundingTimes<-matrix(c(5.40, 5.50, 5.55, 5.85, 5.70, 5.75, 5.20, 5.60, 5.50, 5.55, 5.50, 5.40,
5.90, 5.85, 5.70, 5.45, 5.55, 5.60, 5.40, 5.40, 5.35, 5.45, 5.50, 5.35, 5.25, 5.15, 5.00, 5.85,
5.80, 5.70, 5.25, 5.20, 5.10, 5.65, 5.55, 5.45, 5.60, 5.35, 5.45, 5.05, 5.00, 4.95, 5.50, 5.50,
5.40, 5.45, 5.55, 5.50, 5.55, 5.55, 5.35, 5.45, 5.50, 5.55, 5.50, 5.45, 5.25, 5.65, 5.60, 5.40,
5.70, 5.65, 5.55, 6.30, 6.30, 6.25),nrow = 22,byrow = TRUE,dimnames = list(1 : 22,
c("Round Out", "Narrow Angle", "Wide Angle")))

pWNMT(RoundingTimes,n.mc=2500)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(NSM3)
Loading required package: combinat

Attaching package: 'combinat'

The following object is masked from 'package:utils':

    combn

Loading required package: MASS
Loading required package: partitions
Loading required package: survival
fANCOVA 0.5-1 loaded
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/NSM3/pWNMT.Rd_%03d_medium.png", width=480, height=480)
> ### Name: pWNMT
> ### Title: Wilcoxon, Nemenyi, McDonald-Thompson
> ### Aliases: pWNMT
> ### Keywords: Wilcoxon Nemenyi McDonald-Thompson
> 
> ### ** Examples
> 
> ##Hollander-Wolfe-Chicken Example 7.3 Rounding First Base
> RoundingTimes<-matrix(c(5.40, 5.50, 5.55, 5.85, 5.70, 5.75, 5.20, 5.60, 5.50, 5.55, 5.50, 5.40,
+ 5.90, 5.85, 5.70, 5.45, 5.55, 5.60, 5.40, 5.40, 5.35, 5.45, 5.50, 5.35, 5.25, 5.15, 5.00, 5.85,
+ 5.80, 5.70, 5.25, 5.20, 5.10, 5.65, 5.55, 5.45, 5.60, 5.35, 5.45, 5.05, 5.00, 4.95, 5.50, 5.50,
+ 5.40, 5.45, 5.55, 5.50, 5.55, 5.55, 5.35, 5.45, 5.50, 5.55, 5.50, 5.45, 5.25, 5.65, 5.60, 5.40,
+ 5.70, 5.65, 5.55, 6.30, 6.30, 6.25),nrow = 22,byrow = TRUE,dimnames = list(1 : 22,
+ c("Round Out", "Narrow Angle", "Wide Angle")))
> 
> pWNMT(RoundingTimes,n.mc=2500)
Number of blocks: n= 22 
Number of treatments: k= 3 
Using the Monte Carlo(with  2500 Iterations)  method: 
 
For treatments 1 - 2 , the  Wilcoxon, Nemenyi, McDonald-Thompson R  Statistic is 6 . 
The smallest experimentwise error rate leading to rejection is 0.6408 .
  
For treatments 1 - 3 , the  Wilcoxon, Nemenyi, McDonald-Thompson R  Statistic is 21 . 
The smallest experimentwise error rate leading to rejection is 0.0036 .
  
For treatments 2 - 3 , the  Wilcoxon, Nemenyi, McDonald-Thompson R  Statistic is 15 . 
The smallest experimentwise error rate leading to rejection is 0.0548 .
  
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>