hypothesize | R Documentation |
Declare a null hypothesis about variables selected in specify()
.
Learn more in vignette("infer")
.
hypothesize(x, null, p = NULL, mu = NULL, med = NULL, sigma = NULL)
hypothesise(x, null, p = NULL, mu = NULL, med = NULL, sigma = NULL)
x |
A data frame that can be coerced into a tibble. |
null |
The null hypothesis. Options include
|
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. |
A tibble containing the response (and explanatory, if specified) variable data with parameter information stored as well.
Other core functions:
calculate()
,
generate()
,
specify()
# hypothesize independence of two variables
gss %>%
specify(college ~ partyid, success = "degree") %>%
hypothesize(null = "independence")
# hypothesize a mean number of hours worked per week of 40
gss %>%
specify(response = hours) %>%
hypothesize(null = "point", mu = 40)
# more in-depth explanation of how to use the infer package
## Not run:
vignette("infer")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.