| powerSim {NCStats} | R Documentation |
This function plots the null and actual distributions, highlights the rejection region and the power region, and allows the user to manipulate the effect size, standard deviation, sample size, and alpha to determine the effect on power.
powerSim(mu0 = 100, s.mua = 95, s.sigma = 10, s.n = 30,
s.alpha = 0.05, lower.tail = TRUE)
mu0 |
A single numeric that is the null hypothesized mean. |
s.mua |
A single numeric that is the starting value for the actual population mean. |
s.sigma |
A single numeric that is the starting value for the actual population standard deviation. |
s.n |
A single numeric that is the starting value for the sample size. |
s.alpha |
A single numeric that is the starting value for alpha. |
lower.tail |
A single logical indicating if the rejection region is into the lower tail or not. |
None, but a dynamic graphic with slider bars is produced.
if (interactive()) {
powerSim()
powerSim(lower.tail=FALSE)
}