median_test: Mood's median test for comparison of group medians

View source: R/median_test.R

median_testR Documentation

Mood's median test for comparison of group medians

Description

Mood's median test for comparison of group medians

Usage

median_test(d, x, g, tol = 1e-06)

Arguments

d

a data frame

x

unquoted name of quantitative variable

g

unquoted name of grouping variable

tol

(default 1e-6) any data values closer to overall median than this are discarded

Value

list of 2 objects: table, counts of values above and below the grand median in each group; value, test statistic, df and P-value

Author(s)

Ken Butler, butler@utsc.utoronto.ca

Examples

median_test(datasets::mtcars,mpg,cyl)
d=data.frame(z=1:9,gg=c(1,1,1,1,1,2,2,2,2))
median_test(d,z,gg)


nxskok/smmr documentation built on Jan. 17, 2024, 3:26 p.m.