Description Usage Arguments Details Value Examples
View source: R/pwr_t_test_2pop_homo.R
pwr_t_test_2pop_homo
computes the power and the sample size for
testing difference of means of two normal populations with equal and
unknown variance.
1 2 | pwr_t_test_2pop_homo(sigma, delta, delta0 = 0, n1 = NULL, n2 = NULL,
pwr = NULL, alternative = "two.sided", sig_level = 0.05)
|
sigma |
populational standard deviation |
delta |
difference of means |
delta0 |
difference of means under null hypothesis |
n1 |
number of observations (sample size) for the first population |
n2 |
number of observations (sample size) for the second population |
pwr |
power of test 1 + β (1 minus type II error probability) |
alternative |
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less" |
sig_level |
significance level (Type I error probability) |
Exactly one of the parameters samples sizes ('n1' and 'n2') and 'pwr' must be passed as NULL, and that parameter is determined from the other. Notice that the last one has non-NULL default so NULL must be explicitly passed if you want to compute it.
#' The parameters 'sigma' and 'delta' are required. The effect size is computed internally.
pwr_t_test_2pop_homo
returns a list with the following
components:
populational standard deviation
difference of means
difference of means under null hypothesis
significance level
A tibble
with sample size, n1
for the
first population and n2
for the second population
1 2 3 4 5 6 | # Power
pwr_t_test_2pop_homo(delta = 5, delta0 = 0, sigma = 2, n1 = 10, n2 = 10,
pwr = NULL, alternative = "two.sided", sig_level = 0.05)
# Sample size
pwr_t_test_2pop_homo(delta = 5, delta0 = 0, sigma = 2, n1 = NULL, n2 = NULL,
pwr = 0.95, alternative = "two.sided", sig_level = 0.05)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.