R: Durbin test

durbin.test {PMCMR} | R Documentation

## Durbin test

### Description

The omnibus test according to Durbin tests whether k groups (or treatments) in a two-way balanced incomplete block design (BIBD) have identical effects.

### Usage

    durbin.test(y, ...)

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

    ## S3 method for class 'formula'
     durbin.test(formula, data, subset,
    na.action, ...)

### Arguments

`y` | either a numeric vector of data values, or a data matrix.
`groups` | a vector giving the group for the corresponding elements of `y` if this is a vector; ignored if `y` is a matrix. If not a factor object, it is coerced to one.
`blocks` | a vector giving the block for the corresponding elements of `y` if this is a vector; ignored if `y` is a matrix. If not a factor object, it is coerced to one.
`formula` | a formula of the form `a ~ b | c`, where `a`, `b` and `c` give the data values and corresponding groups and blocks, respectively.
`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 `NA`s. Defaults to `getOption("na.action")`.
`...` | further arguments to be passed to or from methods.

### Details

The `friedman.test` can be used to test k groups (treatments) for identical effects in a two-way balanced complete block design. In the case of an two-way balanced incomplete block design, the Durbin test can be employed. The H0 is rejected, if at least one group (treatment) is significantly different. The Durbin test is equivalent to the Friedman test in the case of a two-way balanced complete block design.

If y is a matrix, than the columns refer to the groups (treatment) and the rows indicate the block.

See `vignette("PMCMR")` for details.

### Value

A list with class "PMCMR":

`method` | The applied method.
`data.name` | The name of the data.
`p.value` | The p-value according to the studentized range distribution.
`statistic` | The estimated upper quantile of the studentized range distribution.
`p.adjust.method` | Defaults to "none"

### Note

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

This function does not test for ties.

### Author(s)

Thorsten Pohlert

### References

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

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

### See Also

`friedman.test`, `posthoc.durbin.test`

### 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]))
    y
    durbin.test(y)

    ## Example for a complete block design:
    ## Sachs, 1997, p. 675
    ## Six persons (block) received six different diuretics (A to F, treatment).
    ## The responses are the Na-concentration (mval)
    ## in the urine measured 2 hours after each treatment.
    ##
    y <- matrix(c(
    3.88, 5.64, 5.76, 4.25, 5.91, 4.33, 30.58, 30.14, 16.92,
    23.19, 26.74, 10.91, 25.24, 33.52, 25.45, 18.85, 20.45,
    26.67, 4.44, 7.94, 4.04, 4.4, 4.23, 4.36, 29.41, 30.72,
    32.92, 28.23, 23.35, 12, 38.87, 33.12, 39.15, 28.06, 38.23,
    26.65),nrow=6, ncol=6,
    dimnames=list(1:6,LETTERS[1:6]))
    print(y)
    friedman.test(y)
    durbin.test(y)

[Package PMCMR version 4.2 Index]