get_MAD_stat: Calculates the MAD statistic

View source: R/SDS100_get_statistics.R

get_MAD_statR Documentation

Calculates the MAD statistic

Description

The MAD statistic is the Mean Absolute Difference between the means of several groups.

Usage

get_MAD_stat(data, grouping)

Arguments

data

A vector of quantitative data.

grouping

A vector of categorical data indicating which group each value of the quantitative data belongs to.

Examples

 set.seed(100)
 the_data <- c(rnorm(10, -3), rnorm(10, 0), rnorm(10, 3))
 grouping <- c(rep("A", 10), rep("B", 10), rep("C", 10))
 get_MAD_stat(the_data, grouping)


emeyers/SDS100 documentation built on April 28, 2024, 5:07 p.m.