GSTTest function

Generalized Siegel-Tukey Test of Homogeneity of Scales

Generalized Siegel-Tukey Test of Homogeneity of Scales

Performs a Siegel-Tukey k-sample rank dispersion test.

GSTTest(x, ...) ## Default S3 method: GSTTest(x, g, dist = c("Chisquare", "KruskalWallis"), ...) ## S3 method for class 'formula' GSTTest( formula, data, subset, na.action, dist = c("Chisquare", "KruskalWallis"), ... )

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.
  • dist: the test distribution. Defaults's to "Chisquare".
  • 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

Meyer-Bahlburg (1970) has proposed a generalized Siegel-Tukey rank dispersion test for the kk-sample case. Likewise to the fligner.test, this test is a nonparametric test for testing the homogegeneity of scales in several groups. Let thetaitheta_i, and lambdailambda_i denote location and scale parameter of the iith group, then for the two-tailed case, the null hypothesis H: c("%", "\n\n", "lambdai/lambdaj=1thetai=thetaj,i!=j lambda_i / lambda_j = 1 | theta_i = theta_j, i != j") is tested against the alternative, A: lambdai/lambdaj!=1lambda_i / lambda_j != 1

with at least one inequality beeing strict.

The data are combinedly ranked according to Siegel-Tukey. The ranking is done by alternate extremes (rank 1 is lowest, 2 and 3 are the two highest, 4 and 5 are the two next lowest, etc.).

Meyer-Bahlburg (1970) showed, that the Kruskal-Wallis H-test can be employed on the Siegel-Tukey ranks. The H-statistic is assymptotically chi-squared distributed with v=k1v = k - 1 degree of freedom, the default test distribution is consequently dist = "Chisquare". If dist = "KruskalWallis" is selected, an incomplete beta approximation is used for the calculation of p-values as implemented in the function pKruskalWallis of the package SuppDists.

Note

If ties are present, a tie correction is performed and a warning message is given. The GSTTest is sensitive to median differences, likewise to the Siegel-Tukey test. It is thus appropriate to apply this test on the residuals of a one-way ANOVA, rather than on the original data (see example).

Examples

GSTTest(count ~ spray, data = InsectSprays) ## as means/medians differ, apply the test to residuals ## of one-way ANOVA ans <- aov(count ~ spray, data = InsectSprays) GSTTest( residuals( ans) ~ spray, data =InsectSprays)

References

H.F.L. Meyer-Bahlburg (1970), A nonparametric test for relative spread in k unpaired samples, Metrika 15 , 23--29.

See Also

fligner.test, pKruskalWallis, Chisquare, fligner.test

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

Useful links