|
36 | 36 | #' \item `permute`: For each replicate, each input value will be randomly
|
37 | 37 | #' reassigned (without replacement) to a new output value in the sample.
|
38 | 38 | #' \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 |
41 | 41 | #' generation type was previously called `"simulate"`, which has been
|
42 | 42 | #' superseded.
|
43 | 43 | #' }
|
|
50 | 50 | #' generate(reps = 200, type = "bootstrap")
|
51 | 51 | #'
|
52 | 52 | #' # 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 |
54 | 54 | #' gss %>%
|
55 | 55 | #' specify(partyid ~ age) %>%
|
56 | 56 | #' hypothesize(null = "independence") %>%
|
57 | 57 | #' 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") |
58 | 66 | #'
|
59 | 67 | #' # more in-depth explanation of how to use the infer package
|
60 | 68 | #' \dontrun{
|
|
0 commit comments