powered by
Calculates sample size or power for a two-sample normal mean test.
one_norm_size(mu, mu0, sd, alpha, beta = NULL, n = NULL)
Numeric. Returns sample size (if beta is given), or power (if n is given).
beta
n
Numeric. True mean.
Numeric. Null hypothesis mean.
Numeric. Standard deviation.
Numeric. Type I error rate.
Numeric (optional). Type II error rate. Required for sample size calculation.
Integer (optional). Sample size. Required for power calculation.
# Sample size one_norm_size(mu = 2, mu0 = 1.5, sd = 1, alpha = 0.05, beta = 0.2) # Power one_norm_size(mu = 2, mu0 = 1.5, sd = 1, alpha = 0.05, n = 32)
Run the code above in your browser using DataLab