Learn R Programming

rcompanion (version 2.4.36)

multiMangiaficoD: Mangiafico's d

Description

Calculates Mangiafico's d, which is the difference in medians divided by the pooled median absolute deviation, for several groups in a pairwise manner.

Usage

multiMangiaficoD(
  formula = NULL,
  data = NULL,
  x = NULL,
  g = NULL,
  digits = 3,
  ...
)

Value

A list containing a data frame of pairwise statistics, and the comparison with the most extreme value of the statistic.

Arguments

formula

A formula indicating the response variable and the independent variable. e.g. y ~ group.

data

The data frame to use.

x

If no formula is given, the response variable.

g

If no formula is given, the grouping variable.

digits

The number of significant digits in the output.

...

Additional arguments passed to the mad() function.

Author

Salvatore Mangiafico, mangiafico@njaes.rutgers.edu

Details

Mangiafico's d is an appropriate effect size statistic where Mood's median test, or another test comparing two medians, might be used. Note that the response variable is treated as at least interval.

When the data in the first group are greater than in the second group, d is positive. When the data in the second group are greater than in the first group, d is negative.

Be cautious with this interpretation, as R will alphabetize groups in the formula interface if the grouping variable is not already a factor.

Currently, the function makes no provisions for NA values in the data. It is recommended that NAs be removed beforehand.

References

https://rcompanion.org/handbook/F_09.html

See Also

mangiaficoD

Examples

Run this code
data(Catbus)
multiMangiaficoD(Steps ~ Teacher, data=Catbus)

Run the code above in your browser using DataLab