Learn R Programming

infer (version 0.3.1)

hypothesize: Declare a null hypothesis

Description

Declare a null hypothesis

Usage

hypothesize(x, null, ...)

Arguments

x

a data frame that can be coerced into a tbl_df

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

a data frame with attributes set

Examples

Run this code
# NOT RUN {
# 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")
# }

Run the code above in your browser using DataLab