Description Usage Arguments Value See Also Examples
ttest.pexplore
computes (via simulation) the power of an experiment that will be analyzed using a t-test for a range of sample sizes.
Rather than taking a theoretical distribution, this function takes empirical data and bootstraps them to calculate the power.
For an equivalent function that does not rely on pilot data see ttestpower.
1 2 3 | chisq.pexplore(x, y = NULL, lown, topn, r = 10000,
alternative = c("two.sided", "less", "greater"), mu = NULL,
alpha = 0.05, plotit = TRUE)
|
lown |
smallest sample size to explore. |
topn |
largest sample size to explore. |
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= |
The probability of finding p < α with the experiment description.
ttest.pow
, ttest.ppow
, ttest.explore
, and ttest.pexplore
.
1 2 3 | ttest.pexplore(x=c(0, 5, 10), lown=16, topn=24) # Power for a one-sample t-test with n in 16-24. Pilot data consists of three data points.
ttest.pexplore(x=c(0, 5, 10), lown=16, topn=24,mu = -5) # Same as above, changing the avarege under the null to -5.
ttest.pexplore(x=c(0, 5, 10), lown=16, topn=24, y=c(9, 3, 2, 1)) # Power for a two-sample t-test with n=16-24 (per condition) using unbalanced pilot data.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.