pwr_sigma_2pop: Power and sample size for F test for variance.

Description Usage Arguments Details Value Examples

View source: R/pwr_sigma_2pop.R

Description

pwr_sigma_2pop computes the power and the sample size for testing to compare variances of two normal population.

Usage

1
2
pwr_sigma_2pop(sigma1, sigma2, n1 = NULL, n2 = NULL, pwr = NULL,
alternative = "two.sided", sig_level = 0.05)

Arguments

sigma1

populational standard deviation for the first population

sigma2

populational standard deviation for the second population

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)

Details

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 'sigma1 and 'sigma2' are required. The effect size is computed internally.

Value

pwr_sigma_2pop returns a list with the following components:

sigma1

populational standard deviation

sigma2

standard deviation under null hypothesis

sig_level

significance level

power_sampleSize

A tibble with sample size, n1 for the first population and n2 for the second population

Examples

1
2
3
4
5
6
# Power
pwr_sigma_2pop(sigma1 = 10, sigma2 = 20, n1 = 25, n2 = 21, pwr = NULL,
alternative = "two.sided", sig_level = 0.05)
# Sample size
pwr_sigma_2pop(sigma = 10, sigma0 = 20, n = NULL, pwr = 0.95,
alternative = "two.sided", sig_level = 0.05)

gilberto-sassi/power documentation built on July 17, 2020, 1:02 p.m.