durbin {CMHNPA}R Documentation

Durbin Test

Description

durbin returns the results of Durbin's Rank Sum test.

Usage

durbin(
  y,
  groups,
  blocks,
  n_components = 0,
  n_permutations = 0,
  group_scores = NULL,
  sig_digits = 4,
  verbose = FALSE
)

Arguments

y

a numeric vector for the response variable.

groups

a vector giving the group for the corresponding elements of y.

blocks

a vector giving the block for the corresponding elements of y.

n_components

the number of polynomial components you wish to test. The maximum number of components is the number of groups less one. If the number of components requested is less than t-2, a remainder component is created.

n_permutations

the number of permutations you wish to run.

group_scores

the scores to be applied to the groups. If not declared these will be set automatically and should be checked.

sig_digits

the number of significant digits the output should show.

verbose

flag for turning on the status bar for permutation tests.

Details

The test is a generalisation of Friedman's test that can be applied to BIBD.

Value

The Durbin test adjusted for tied results.

References

Rayner, J.C.W and Livingston, G. C. (2022). An Introduction to Cochran-Mantel-Haenszel Testing and Nonparametric ANOVA. Wiley.

Examples

attach(icecream)
durbin(y = rank, groups = variety, blocks = judge)

[Package CMHNPA version 1.1.1 Index]