GcTest: Gaur's Gc Test

Description Usage Arguments Value Author(s) References Examples

View source: R/GcTest.R

Description

GcTest performs Gaur's Gc test.

Usage

1
GcTest(formula, data, alpha = 0.05, na.rm = TRUE, verbose = TRUE, c = 2)

Arguments

formula

a formula of the form lhs ~ rhs where lhs gives the sample values and rhs the corresponding groups.

data

a data frame containing the variables in the formula formula

alpha

the level of significance to assess the statistical difference. Default is set to alpha = 0.05.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

verbose

a logical for printing output to R console.

c

a integer value chosen from (1,..., min(n_i)) for subsample size. Default is set to c = 2.

Value

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

statistic

the Gaur's Gc test statistic.

mean

the mean of the Gaur's Gc test statistic.

variance

the variance of the Gaur's Gc test statistic.

Z

the standardized test statistic.

p.value

the p-value of the test.

alpha

the level of significance.

method

the character string "Gaur's Gc test ".

data

a data frame containing the variables in which NA values (if exist) are removed.

formula

a formula of the form lhs ~ rhs where lhs gives the sample values and rhs the corresponding groups.

Author(s)

Bulent Altunkaynak

References

Gaur, A., (2017). A class of k-sample distribution-free tests for location against ordered alternatives. Communications in Statistics-Theory and Methods, 46:5, 2343-2353.

Jonckheere, A. R. (1954). A Distribution-Free k-Sample Test Against Ordered Alternatives. Biometrika, 41, 133-145.

Examples

1
2
3
4
5
6
7
8
9
library(npordtests)

## Data from Jonckheere (1954)
data(jdata)
GcTest(Y~X,jdata)

## Data from Lehmann (1975)
data(lehmann)
GcTest(Values~Group,lehmann)

npordtests documentation built on Oct. 30, 2019, 11:35 a.m.