durbinTest: Durbin Test

View source: R/durbinTest.R

durbinTestR Documentation

Durbin Test

Description

Performs Durbin's tests whether k groups (or treatments) in a two-way balanced incomplete block design (BIBD) have identical effects.

Usage

durbinTest(y, ...)

## Default S3 method:
durbinTest(y, groups, blocks, ...)

Arguments

y

a numeric vector of data values, or a list of numeric data vectors.

groups

a vector or factor object giving the group for the corresponding elements of "x". Ignored with a warning if "x" is a list.

blocks

a vector or factor object giving the block for the corresponding elements of "x". Ignored with a warning if "x" is a list.

...

further arguments to be passed to or from methods.

Details

For testing a two factorial layout of a balanced incomplete block design whether the k groups have identical effects, the Durbin test can be performed. The null hypothesis, H_0: \theta_i = \theta_j ~ (1 \le i < j \le k), is tested against the alternative that at least one \theta_i \ne \theta_j.

The p-values are computed from the chi-square distribution.

Value

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.

Note

The function does not test, whether it is a true BIBD. This function does not test for ties.

References

Conover,W. J. (1999) Practical nonparametric Statistics, 3rd. Edition, Wiley.

Heckert, N. A., Filliben, J. J. (2003) NIST Handbook 148: Dataplot Reference Manual, Volume 2: Let Subcommands and Library Functions. National Institute of Standards and Technology Handbook Series, June 2003.

Examples

## Example for an incomplete block design:
## Data from Conover (1999, p. 391).
y <- matrix(c(
2,NA,NA,NA,3, NA,  3,  3,  3, NA, NA, NA,  3, NA, NA,
  1,  2, NA, NA, NA,  1,  1, NA,  1,  1,
NA, NA, NA, NA,  2, NA,  2,  1, NA, NA, NA, NA,
 3, NA,  2,  1, NA, NA, NA, NA,  3, NA,  2,  2
), ncol=7, nrow=7, byrow=FALSE,
dimnames=list(1:7, LETTERS[1:7]))
durbinTest(y)

PMCMRplus documentation built on May 29, 2024, 8:34 a.m.