View source: R/reportSeverity.R
getPower | R Documentation |
Implements basic power calculations in R See also: https://www.cyclismo.org/tutorial/R/power.html
getPower(mu0, mu1, n, sigma, alpha, tdist = FALSE, 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) |
n |
sample size |
sigma |
sample s.d. |
alpha |
error |
tdist |
logical. Use Student t Distribution. Default: FALSE |
alternative |
a character string specifying the alternative hypothesis, must be one of "two.sided", "greater" (default) or "less". |
## Power should be approx. 0.9183621: getPower(mu0=5, mu1=6.5, n=20, sigma=2, alpha=0.05, tdist = FALSE, alternative = "two.sided") ## Power should be approx. 0.8887417: getPower(mu0=5, mu1=6.5, n=20, sigma=2, alpha=0.05, tdist = TRUE, alternative = "two.sided") ## Compare with results from power.t.test powerVal <- power.t.test(n=20, delta=1.5, sd=2, sig.level=0.05, type="one.sample", alternative="two.sided",strict = TRUE) powerVal$power
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.