Description Usage Arguments Value See Also Examples
ttest.explore
computes (through simulation) the power of an experiment that will be analyzed using a t-test for a set of potential sample sizes. When two means are provided,
function assumes a two-sample unpaired t-test, and n
is interpreted as the sample size of each group (for a total sample size or 2n
).
ttest.explore
computes (through simulation) the power of an experiment that will be analyzed using a t-test for a set of potential sample sizes. When two means are provided,
function assumes a two-sample unpaired t-test, and n
is interpreted as the sample size of each group (for a total sample size or 2n
).
1 2 3 4 5 6 7 | ttest.explore(lown, topn, means, var, r = 10000,
alternative = c("two.sided", "less", "greater"), mu = 0, alpha = 0.05,
conf.level = 0.95, plotit = TRUE)
ttest.explore(lown, topn, means, var, r = 10000,
alternative = c("two.sided", "less", "greater"), mu = 0, alpha = 0.05,
conf.level = 0.95, plotit = TRUE)
|
lown |
smallest sample size to explore. |
topn |
largest sample size to explore. |
means |
either a list with two average values (computes a two-sample t-test) or a single value (computes a one-sample t-test). |
var |
expected variance in each group. |
r |
number of simulations to compute power. |
alternative |
type of alternative hypothesis in binomial test. Must be " |
mu |
mean value according to null hypothesis (default = |
alpha |
significance threshhold. |
plotit |
logical (default= |
lown |
smallest sample size to explore. |
topn |
largest sample size to explore. |
plotit |
logical (default= |
The probability of finding p < α with the experiment description.
ttest.pow
, ttest.ppow
, ttest.explore
, and ttest.pexplore
.
1 2 3 4 5 6 | ttest.explore(lown=10, topn=15, means=c(5, 10), var=10) # two-sample t-test. Effective sample sizes are 20 to 30 (10 to 15 per group)
ttest.explore(lown=10, topn=15, means=20, var=10) # one-sample t-test. Comparing if average is different from 0.
ttest.explore(lown=10, topn=15, means=20, var=10, mu=10, alternative="higher") # one-sample t-test. Comparing if average is higher than 10.
ttest.explore(lown=10, topn=15, means=c(5, 10), var=10) # two-sample t-test. Effective sample sizes are 20 to 30 (10 to 15 per group)
ttest.explore(lown=10, topn=15, means=20, var=10) # one-sample t-test. Comparing if average is different from 0.
ttest.explore(lown=10, topn=15, means=20, var=10, mu=10, alternative="higher") # one-sample t-test. Comparing if average is higher than 10.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.