rcompanion (version 2.2.2)

scheirerRayHare: Scheirer Ray Hare test

Description

Conducts Scheirer Ray Hare test.

Usage

scheirerRayHare(formula = NULL, data = NULL, y = NULL, x1 = NULL,
  x2 = NULL, tie.correct = TRUE, ss = TRUE, verbose = TRUE)

Arguments

formula

A formula indicating the response variable and two independent variables. e.g. y ~ x1 + x2.

data

The data frame to use.

y

If no formula is given, the response variable.

x1

The first independent variable.

x2

The second independent variable.

tie.correct

If "TRUE", applies a correction for ties in the response variable.

ss

If "TRUE", includes the sums of squares in the output.

verbose

If "TRUE", outputs statistics used in the analysis by direct print.

Value

A data frame of results similar to an anova table. Output from the verbose option is printed directly and not returned with the data frame.

Details

The Scheirer Ray Hare test is a nonparametric test used for a two-way factorial experiment. It is described by Sokal and Rohlf (1995). At the time of writing, it does not appear to be a common or well-regarded test. It is sometimes recommended that the design should be balanced, and that there should be at least five observations for each cell in the interaction.

The input should include either formula and data; or y, x1, and x2.

The function removes cases with NA in any of the variables.

References

Sokal, R.R. and F.J. Rohlf. 1995. Biometry. 3rd ed. W.H. Freeman, New York.

http://rcompanion.org/handbook/F_14.html

Examples

Run this code
# NOT RUN {
### Example from Sokal and Rohlf, 1995.
Value = c(709,679,699,657,594,677,592,538,476,508,505,539)
Sex   = c(rep("Male",3), rep("Female",3), rep("Male",3), rep("Female",3))
Fat   = c(rep("Fresh", 6), rep("Rancid", 6))
Sokal = data.frame(Value, Sex, Fat)

scheirerRayHare(Value ~ Sex + Fat, data=Sokal)
                                                             
# }

Run the code above in your browser using DataCamp Workspace