stat_test {baizer}R Documentation

statistical test which returns a extensible tibble

Description

statistical test which returns a extensible tibble

Usage

stat_test(
  df,
  y,
  x,
  .by = NULL,
  trans = "identity",
  paired = FALSE,
  paired_by = NULL,
  alternative = "two.sided",
  exclude_func = NULL,
  method = "wilcoxon",
  ns_symbol = "NS",
  digits = 2
)

Arguments

df

tibble

y

value

x

sample test group

.by

super-group

trans

scale transformation

paired

paired samples or not

paired_by

a column for pair

alternative

one of "two.sided" (default), "greater" or "less"

exclude_func

a function has two arguments and return bool value, used if paired=TRUE and will keep the comparation pairs which return TRUE by this function.

method

test method, 'wilcoxon' as default, one of t|wilcoxon

ns_symbol

symbol of nonsignificant, 'NS' as default

digits

significant figure digits of p value If the data pair of a single test returns TRUE, then exclude this pair

Value

test result tibble

Examples

stat_test(mini_diamond, y = price, x = cut, .by = clarity)

[Package baizer version 0.8.0 Index]