ttests {exams.forge} | R Documentation |
T-tests
Description
ttests
runs a variety of modifications to the input parameters of ttest
, in order to generate all possible t-tests.
See under "Details" the detailed parameter values which are used. Note that not giving the parameter hyperloop
will
results in approx. 5000 t-tests generated.
Returned will be only the different t-tests with the first element being ttest
. If only a specific element of a ttest
is of interest then just give the name of the element in elem
and then all ttest
s will be returned where elem
is different.
Usage
ttests(ttest, elem = NULL, hyperloop = NULL)
Arguments
ttest |
ttest: 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(n = c(1, ttest$n, ttest$n+1), mu0 = c(ttest$mu0, ttest$mean), mean = c(ttest$mu0, ttest$mean), sigma = c(ttest$sigma, ttest$sd, sqrt(ttest$sigma), sqrt(ttest$sd)), sd = c(ttest$sigma, ttest$sd, sqrt(ttest$sigma), sqrt(ttest$sd)), norm = c(TRUE, FALSE), alpha = unique(c(ttest$alpha, 0.01, 0.05, 0.1)), alternative = c("two.sided", "greater", "less") )
Value
A list of ttest
objects is returned
Examples
basetest <- ttest_num(mean=0.5, sd=1.25, n=50, sigma=1)
# vary the number of observations
hyperloop <- list(n=c(1, basetest$n, basetest$n^2))
# return all different t-tests
tts <- ttests(basetest, hyperloop=hyperloop)
# return all different random sampling functions
ttests(basetest, "Xbar", hyperloop)