infer (version 0.5.0)

hypothesize: Declare a null hypothesis

Description

Declare a null hypothesis

Usage

hypothesize(x, null, p = NULL, mu = NULL, med = NULL, sigma = NULL)

Arguments

x

A data frame that can be coerced into a tibble.

null

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

p

The true proportion of successes (a number between 0 and 1). To be used with point null hypotheses when the specified response variable is categorical.

mu

The true mean (any numerical value). To be used with point null hypotheses when the specified response variable is continuous.

med

The true median (any numerical value). To be used with point null hypotheses when the specified response variable is continuous.

sigma

The true standard deviation (any numerical value). To be used with point null hypotheses.

Value

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

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 DataCamp Workspace