Description Usage Arguments Details Value Examples
View source: R/pwr_sigma_1pop.R
pwr_sigma_1pop
computes the power and the sample size for testing
variance in a normal variable.
1 2 | pwr_sigma_1pop(sigma, sigma0, n = NULL, pwr = NULL,
alternative = "two.sided", sig_level = 0.05)
|
sigma |
populational standard deviation |
sigma0 |
standard deviation under null hypothesis |
n |
number of observations (sample size) |
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 'n' 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.
This function computes internally the effect size, given the populational standard deviation and the standard deviation under null hypothesis. These parameters are required.
pwr_sigma_1pop
returns a list with the following components:
populational standard deviation
standard deviation under null hypothesis
significance level
A tibble
with sample size n
and
power pwr
1 2 3 4 5 6 | # Power
pwr_sigma_1pop(sigma = 10, sigma0 = 20, n = 25, pwr = NULL,
alternative = "two.sided", sig_level = 0.05)
# Sample size
pwr_sigma_1pop(sigma = 10, sigma0 = 20, n = 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.