View source: R/reportSeverity.R
getSampleSize | R Documentation |
Implements sample size calculations in R See also: https://www.cyclismo.org/tutorial/R/power.html and https://influentialpoints.com/Training/statistical_power_and_sample_size.htm
getSampleSize(mu0, mu1, alpha, beta, sigma, alternative = "greater")
mu0 |
mean value of the null hypothesis (usually referred to as H0) |
mu1 |
mean value of the alternative hypothesis (usually referred to as H1) |
alpha |
type I error |
beta |
type II error |
sigma |
sample s.d. |
alternative |
a character string specifying the alternative hypothesis, must be one of "two.sided", "greater" (default) or "less". |
n number of required samples in each arm of a trial. Note: total number of samples is 2*n.
getSampleSize(mu0 = 0, mu1 = 200, alpha=0.05, beta=0.2, sigma=450, alternative="two.sided") getSampleSize(mu0 = 8.72, mu1 = 8.72*1.1, alpha=0.05, beta=0.2, sigma=1.3825, alternative="greater") getSampleSize(mu0 = 8.72, mu1 = 8.72*1.1, alpha=0.05, beta=0.2, sigma=1.3825, alternative="two.sided")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.