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

set.seed(1)
morie_control_median_test(x = rnorm(50), y = rnorm(50))
#> $statistic
#> [1] 0
#> 
#> $p_value
#> [1] 1
#> 
#> $df
#> [1] 1
#> 
#> $n
#> [1] 100
#> 
#> $m
#> [1] 50
#> 
#> $n_y
#> [1] 50
#> 
#> $grand_median
#> [1] 0.1139092
#> 
#> $table
#>   above below_eq
#> x    25       25
#> y    25       25
#> 
#> $method
#> [1] "Control-median (Mood's median) test"
#>