flignerWolfeTest function

Testing Several Treatments With One Control

Testing Several Treatments With One Control

Performs Fligner-Wolfe non-parametric test for simultaneous testing of several locations of treatment groups against the location of the control group.

flignerWolfeTest(x, ...) ## Default S3 method: flignerWolfeTest( x, g, alternative = c("greater", "less"), dist = c("Wilcoxon", "Normal"), ... ) ## S3 method for class 'formula' flignerWolfeTest( formula, data, subset, na.action, alternative = c("greater", "less"), dist = c("Wilcoxon", "Normal"), ... )

Arguments

  • x: a numeric vector of data values, or a list of numeric data vectors.
  • ...: further arguments to be passed to or from methods.
  • g: a vector or factor object giving the group for the corresponding elements of "x". Ignored with a warning if "x" is a list.
  • alternative: the alternative hypothesis. Defaults to "greater".
  • dist: the test distribution. Defaults to "Wilcoxon".
  • formula: a formula of the form response ~ group where response gives the data values and group a vector or factor of the corresponding groups.
  • data: an optional matrix or data frame (or similar: see model.frame) containing the variables in the formula formula. By default the variables are taken from environment(formula).
  • subset: an optional vector specifying a subset of observations to be used.
  • na.action: a function which indicates what should happen when the data contain NAs. Defaults to getOption("na.action").

Returns

A list with class "htest" containing the following components:

  • method: a character string indicating what type of test was performed.
  • data.name: a character string giving the name(s) of the data.
  • statistic: the estimated quantile of the test statistic.
  • p.value: the p-value for the test.
  • parameter: the parameters of the test statistic, if any.
  • alternative: a character string describing the alternative hypothesis.
  • estimates: the estimates, if any.
  • null.value: the estimate under the null hypothesis, if any.

Details

For a one-factorial layout with non-normally distributed residuals the Fligner-Wolfe test can be used.

Let there be k1k-1-treatment groups and one control group, then the null hypothesis, H0:θiθc=0 (1ik1)_0: \theta_i - \theta_c = 0 ~ (1 \le i \le k-1)

is tested against the alternative (greater), A1:θiθc>0 (1ik1)_1: \theta_i - \theta_c > 0 ~ (1 \le i \le k-1), with at least one inequality being strict.

Let ncn_c denote the sample size of the control group, Nt=i=1k1niN^t = \sum_{i=1}^{k-1} n_i the sum of all treatment sample sizes and N=Nt+ncN = N^t + n_c. The test statistic without taken ties into account is

W=j=1k1i=1nirijNt(Nt+1)2 W = \sum_{j=1}^{k-1} \sum_{i=1}^{n_i} r_{ij} -\frac{N^t \left(N^t + 1 \right) }{2}%SEE PDF

with rijr_{ij} the rank of variable xijx_{ij}. The null hypothesis is rejected, if W>Wα,m,nW > W_{\alpha,m,n} with m=Ntm = N^t and n=ncn = n_c.

In the presence of ties, the statistic is

z^=WncNt/2sW, \hat{z} = \frac{W - n_c N^t / 2}{s_W},%SEE PDF

where

sW=ncNt12N(N1)j=1gtj(tj21), s_W =\frac{n_c N^t}{12 N \left(N - 1 \right)}\sum_{j=1}^g t_j \left(t_j^2 - 1\right),%SEE PDF

with gg the number of tied groups and tjt_j

the number of tied values in the jjth group. The null hypothesis is rejected, if z^>zα\hat{z} > z_\alpha (as cited in EPA 2006).

If dist = Wilcoxon, then the pp-values are estimated from the Wilcoxon

distribution, else the Normal distribution is used. The latter can be used, if ties are present.

Note

Factor labels for g must be assigned in such a way, that they can be increasingly ordered from zero-dose control to the highest dose level, e.g. integers {0, 1, 2, ..., k} or letters {a, b, c, ...}. Otherwise the function may not select the correct values for intended zero-dose control.

It is safer, to i) label the factor levels as given above, and to ii) sort the data according to increasing dose-levels prior to call the function (see order, factor).

Examples

## Example from Sachs (1997, p. 402) x <- c(106, 114, 116, 127, 145, 110, 125, 143, 148, 151, 136, 139, 149, 160, 174) g <- gl(3,5) levels(g) <- c("A", "B", "C") ## Chacko's test chackoTest(x, g) ## Cuzick's test cuzickTest(x, g) ## Johnson-Mehrotra test johnsonTest(x, g) ## Jonckheere-Terpstra test jonckheereTest(x, g) ## Le's test leTest(x, g) ## Spearman type test spearmanTest(x, g) ## Murakami's BWS trend test bwsTrendTest(x, g) ## Fligner-Wolfe test flignerWolfeTest(x, g) ## Shan-Young-Kang test shanTest(x, g)

References

EPA (2006) Data Quality Assessment: Statistical Methods for Practitioners

(Guideline No. EPA QA/G-9S), US-EPA.

Fligner, M.A., Wolfe, D.A. (1982) Distribution-free tests for comparing several treatments with a control. Stat Neerl 36 , 119--127.

See Also

kruskalTest and shirleyWilliamsTest

of the package PMCMRplus, kruskal.test of the library stats.

  • Maintainer: Thorsten Pohlert
  • License: GPL (>= 3)
  • Last published: 2024-09-08

Useful links