The objective of this package is to perform statistical inference using an expressive statistical grammar that coheres with the
tidyverse design framework.
To install the current stable version of
infer from CRAN:
To install the developmental version of
infer, make sure to install
These examples assume that
mtcars has been overwritten so that the variables
mtcars <- as.data.frame(mtcars) %>% mutate(cyl = factor(cyl), vs = factor(vs), am = factor(am), gear = factor(gear), carb = factor(carb))
Hypothesis test for a difference in proportions:
mtcars %>% specify(am ~ vs, success = "1") %>% hypothesize(null = "independence") %>% generate(reps = 100, type = "permute") %>% calculate(stat = "diff in props", order = c("1", "0"))
Confidence interval for a difference in means:
Other examples are available in the package vignettes.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.