Declare a null hypothesis

hypothesize(x, null, ...)

Arguments

x

A data frame that can be coerced into a tibble.

null

The null hypothesis. Options include "independence" and "point".

...

Arguments passed to downstream functions.

Value

A tibble containing the response (and explanatory, if specified) variable data with parameter information stored as well.

Examples

# Permutation test similar to ANOVA mtcars %>% dplyr::mutate(cyl = factor(cyl)) %>% specify(mpg ~ cyl) %>% hypothesize(null = "independence") %>% generate(reps = 100, type = "permute") %>% calculate(stat = "F")
#> # A tibble: 100 x 2 #> replicate stat #> <int> <dbl> #> 1 1 2.12 #> 2 2 0.156 #> 3 3 0.0258 #> 4 4 0.0981 #> 5 5 1.09 #> 6 6 1.81 #> 7 7 0.180 #> 8 8 7.45 #> 9 9 0.828 #> 10 10 0.621 #> # … with 90 more rows