| proptests {exams.forge} | R Documentation |
Proportion Tests
Description
proptests runs a bunch of modifications of the input parameters of proptest to generate all possible proportion tests.
See under "Details" the detailed parameter values which are used. Note that not giving the parameter hyperloop will
results in several hundred tests generated.
Only the distinct tests will be returned, with the first element being proptest. If only a specific element of a proptests is of interest,
provide the name of the element in elem. All proptests will then be returned where the value of elem is different.
Usage
proptests(proptest, elem = NULL, hyperloop = NULL)
Arguments
proptest |
proptest: the base result from a valid t-test generated by |
elem |
character: element to extract (default: |
hyperloop |
named list: parameter values to run over (default: see above) |
Details
The default hyperloop is:
list(x = c(proptest$x, proptest$n-proptest$x)
pi0 = c(proptest$pi0, 1-proptest$pi0, proptest$x/proptest$n, 1-proptest$x/proptest$n)
alpha = unique(c(proptest$alpha, 0.01, 0.05, 0.1)),
alternative = c("two.sided", "greater", "less")
)
Value
list of proptest objects is returned
Examples
basetest <- proptest_num(x=3, n=8, alternative="greater")
# vary the number of observations
hyperloop <- list(pi0 = c(basetest$pi0, 1-basetest$pi0,
basetest$x/basetest$n, 1-basetest$x/basetest$n))
# return all different tests
tts <- proptests(basetest, hyperloop=hyperloop)
# return all different random sampling functions
proptests(basetest, "X", hyperloop)