Last data update: 2014.03.03

R: Dwass, Steel, Critchlow, Fligner
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")

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/pSDCFlig.Rd_%03d_medium.png", width=480, height=480)
> ### Name: pSDCFlig
> ### Title: Dwass, Steel, Critchlow, Fligner
> ### Aliases: pSDCFlig
> ### Keywords: Dwass Steel Critchlow-Fligner
> 
> ### ** 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")
Ties are present, so p-values are based on conditional null distribution. 
Group sizes:  10 10 
Using the Asymptotic method: 
 
For treatments 1 - 2 , the  Dwass, Steel, Critchlow-Fligner W  Statistic is 1.6652 . 
The smallest experimentwise error rate leading to rejection is 0.2391 .
  
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>