test_summarize_linear_contrasts {crosstable} | R Documentation |
Test for linear trend across ordered factor with contrasts
Description
Test for linear trend across ordered factor with contrasts
Usage
test_summarize_linear_contrasts(x, y)
Arguments
x |
vector |
y |
ordered factor |
Value
a list with two components: p.value and method
Author(s)
Dan Chaltiel
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)
[Package crosstable version 0.7.0 Index]