Description Usage Arguments Value See Also Examples
ttest.pow computes (via simulation) the power of an experiment that will be analyzed using a t-test. 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 | 
| 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. | 
| n | sample size. | 
| 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. | 
The probability of finding p < α with the experiment description.
ttest.pow, ttest.ppow, ttest.explore, and ttest.pexplore.
| 1 2 3 | ttest.pow(means=c(5, 10), var=10, n=16) # two-sample t-test. n=16 refers to each condition, for a total of 32.
ttest.pow(means=20, var=10, n=16) # one-sample t-test. Comparing if average is different from 0. Because there is only condition, the total sample isze is 16.
ttest.pow(means=20, var=10, n=16, 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.