| ttest_data {exams.forge} | R Documentation |
T-tests and Data Creation
Description
Creates data for a t-test, for one mean, based on the test's properties.
Usage
ttest_data(
size = (3:20)^2,
mean = -5:5,
sd = seq(0.1, 1, by = 0.1),
reject = NA,
alternative = c("two.sided", "less", "greater"),
alpha = c(0.01, 0.05, 0.1),
z = seq(-4.49, 4.49, by = 0.01),
use.sigma = TRUE
)
dt1(
size = (3:20)^2,
mean = -5:5,
sd = seq(0.1, 1, by = 0.1),
reject = NA,
alternative = c("two.sided", "less", "greater"),
alpha = c(0.01, 0.05, 0.1),
z = seq(-4.49, 4.49, by = 0.01),
use.sigma = TRUE
)
Arguments
size |
numeric: vector of possible sample sizes (default |
mean |
numeric: vector of possible means (default |
sd |
numeric: vector of possible standard deviations (default |
reject |
logical: should |
alternative |
character: a character string specifying the alternative hypothesis, must be one of |
alpha |
numeric: vector of significance levels (default |
z |
numeric: vector of possible |
use.sigma |
logical: should the standard deviation of the population (default) or the sample be used? |
Value
A list with the components:
-
mu0hypothetical mean -
sigmastandard deviation in the population -
sdvector of possible standard deviations in the sample -
xbarmean in the sample -
nsample size -
alphasignificance level -
alternativespecifying the alternative hypothesis (eithertwo.sided,greaterorless) -
altsdalternative values usable forsd(ifuse.sigma==TRUE) orsigma(ifuse.sigma==FALSE)
Examples
ttest_data()