pSDCFlig: Dwass, Steel, Critchlow, Fligner

View source: R/pSDCFlig.R

pSDCFligR Documentation

Dwass, Steel, Critchlow, Fligner

Description

Function to compute the P-value for the observed Dwass, Steel, Critchlow, Fligner W statistic.

Usage

pSDCFlig(x,g=NA,method=NA,n.mc=10000)

Arguments

x

Either a list or a vector containing the data.

g

If x is a vector, g is a required vector of group 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 groups of data can be entered in either of two ways. For data a=1,2 and b=3,4,5 the following are equivalent:

pSDCFlig(x=list(c(1,2),c(3,4,5))) pSDCFlig(x=c(1,2,3,4,5),g=c(1,1,2,2,2))

Value

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

n

a vector containing the number of observations in each of the k data groups

obs.stat

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

p.val

upper tail P-value corresponding to each W statistic

Author(s)

Grant Schneider

Examples

gizzards<-list(site.I=c(46,28,46,37,32,41,42,45,38,44),
              site.II=c(42,60,32,42,45,58,27,51,42,52),
              site.III=c(38,33,26,25,28,28,26,27,27,27),
              site.IV=c(31,30,27,29,30,25,25,24,27,30))
##Takes a little while 
#pSDCFlig(gizzards,method="Monte Carlo")

##Shorter version for demonstration
pSDCFlig(gizzards[1:2],method="Asymptotic")

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

Related to pSDCFlig in NSM3...