Skip to content

Commit cd82f0e

Browse files
authored
merge pr #418: clarify docs re: type = "draw"
2 parents fecb951 + 1ffab27 commit cd82f0e

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

NEWS.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* Re-licensed the package from CC0 to MIT. See the `LICENSE` and `LICENSE.md` files.
44
* Contributed a paper to the Journal of Open Source Software, a draft of which is available in `/figs/paper`.
5+
* Various improvements to documentation (#417, #418).
56

67
# infer 1.0.0
78

R/generate.R

+11-3
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
#' \item `permute`: For each replicate, each input value will be randomly
3737
#' reassigned (without replacement) to a new output value in the sample.
3838
#' \item `draw`: A value will be sampled from a theoretical distribution
39-
#' with parameters specified in [hypothesize()] for each replicate. This
40-
#' option is currently only applicable for testing point estimates. This
39+
#' with parameter `p` specified in [hypothesize()] for each replicate. This
40+
#' option is currently only applicable for testing on one proportion. This
4141
#' generation type was previously called `"simulate"`, which has been
4242
#' superseded.
4343
#' }
@@ -50,11 +50,19 @@
5050
#' generate(reps = 200, type = "bootstrap")
5151
#'
5252
#' # generate a null distribution for the independence of
53-
#' # two variables by permuting their values 1000 times
53+
#' # two variables by permuting their values 200 times
5454
#' gss %>%
5555
#' specify(partyid ~ age) %>%
5656
#' hypothesize(null = "independence") %>%
5757
#' generate(reps = 200, type = "permute")
58+
#'
59+
#' # generate a null distribution via sampling from a
60+
#' # binomial distribution 200 times
61+
#' gss %>%
62+
#' specify(response = sex, success = "female") %>%
63+
#' hypothesize(null = "point", p = .5) %>%
64+
#' generate(reps = 200, type = "draw") %>%
65+
#' calculate(stat = "z")
5866
#'
5967
#' # more in-depth explanation of how to use the infer package
6068
#' \dontrun{

man/generate.Rd

+11-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)