Skip to contents

Two-sample median test: contingency-table chi-square on the counts above/below the pooled-sample median.

Usage

morie_control_median_test(x, y)

Arguments

x

Numeric vector (control).

y

Numeric vector (treatment).

Value

Named list: statistic, p_value, df, n, grand_median, table.

Examples

morie_control_median_test(x = rnorm(50), y = rnorm(50))
#> $statistic
#> [1] 0.36
#> 
#> $p_value
#> [1] 0.5485062
#> 
#> $df
#> [1] 1
#> 
#> $n
#> [1] 100
#> 
#> $m
#> [1] 50
#> 
#> $n_y
#> [1] 50
#> 
#> $grand_median
#> [1] 0.1082061
#> 
#> $table
#>   above below_eq
#> x    27       23
#> y    23       27
#> 
#> $method
#> [1] "Control-median (Mood's median) test"
#>