pNWWM: Nemenyi, Wilcoxon-Wilcox, Miller

View source: R/pNWWM.R

pNWWMR Documentation

Nemenyi, Wilcoxon-Wilcox, Miller

Description

Function to compute the P-value for the observed Nemenyi, Wilcoxon-Wilcox, Miller R* statistic.

Usage

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

Arguments

x

Either a matrix or a vector containing the data, with control assumed to be the first group.

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:

pNWWM(x=matrix(c(1,2,3,4,5,6),ncol=2,byrow=T)) pNWWM(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 (including the control)

n

number of blocks

obs.stat

the observed R* statistic for each treatment vs. control comparison

p.val

upper tail P-value corresponding to each of the k-1 observed R* statistics

Note

The data group containing the treatment values should be entered as the first group.

Author(s)

Grant Schneider

Examples

##Hollander-Wolfe-Chicken Example 7.4 Stuttering Adaptation
adaptation.scores<-matrix(c(57,59,44,51,43,49,48,56,44,50,44,50,70,42,58,54,38,48,38,48,50,53,53,
56,37,58,44,50,58,48,60,58,60,38,48,56,51,56,44,44,50,54,50,40,50,50,56,46,74,57,74,48,48,44),
ncol=3,dimnames = list(1 : 18,c("No Shock", "Shock Following", "Shock During")))

#pNWWM(adaptation.scores)
pNWWM(adaptation.scores,n.mc=2500)


NSM3 documentation built on Sept. 8, 2023, 5:52 p.m.

Related to pNWWM in NSM3...