| proptests | R Documentation |
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 hundered tests generated.
Returned will be only the different tests with the first element is proptest. If only a specific element of a proptest
is of interest then just give the name of the element in elem and then all proptests will be returned where elem is different.
proptests(proptest, elem = NULL, hyperloop = NULL)
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) |
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")
)
list of proptest objects is returned
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.