ttest.1samp | R Documentation |
This function computes power and sample size for a one-sample t test. Can solve for power, N, delta, sd or alpha.
ttest.1samp(
N = NULL,
delta = NULL,
sd = 1,
alpha = 0.05,
power = NULL,
sides = 2,
v = FALSE
)
N |
The sample size. |
delta |
muA (the true mean) - mu0 (the mean under the null). |
sd |
The standard deviation; defaults to 1. |
alpha |
The significance level (type 1 error rate); defaults to 0.05. |
power |
The specified level of power. |
sides |
Either 1 or 2 (default) to specify a one- or two-sided hypothesis test. |
v |
Either TRUE for verbose output or FALSE (default) to output computed argument only. |
A list of the arguments (including the computed one).
ttest.1samp(N = 36, delta = 4.9 - 5.7, sd = 2, sides = 1)
ttest.1samp(N = 36, delta = 6.3 - 5.7, sd = 2, sides = 1)
ttest.1samp(N = 36, delta = 4.9 - 5.7, sd = 2, sides = 2)
ttest.1samp(delta = 0.6, sd = 1, power = 0.8, sides = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.