test_summarize_linear_contrasts function

Test for linear trend across ordered factor with contrasts

Test for linear trend across ordered factor with contrasts

test_summarize_linear_contrasts(x, y)

Arguments

  • x: vector
  • y: ordered factor

Returns

a list with two components: p.value and method

Examples

library(dplyr) my_test_args=crosstable_test_args() my_test_args$test_summarize = test_summarize_linear_contrasts iris %>% mutate(Petal.Width.qt = paste0("Q", ntile(Petal.Width, 5)) %>% ordered()) %>% crosstable(Petal.Length ~ Petal.Width.qt, test=TRUE, test_args = my_test_args)

Author(s)

Dan Chaltiel