pwr_anova_balanced: Power and sample size to balanced ANOVA.

Description Usage Arguments Value Examples

View source: R/pwr_anova_balanced.R

Description

pwr_anova_balanced computes the power and the sample size to ANOVA.

Usage

1
2
pwr_anova_balanced(group_means, mean, sigma, pwr = NULL, n = NULL,
sig_level = 0.05)

Arguments

group_means

vector where each entry is the mean of the treatment

mean

population and general mean

sigma

populational standard deviation

pwr

power of test 1 + β (1 minus type II error probability)

n

number of observations in each treatment.

sig_level

significance level (Type I error probability)

Value

pwr_anova_balanced returns a list with the following components:

group_means

means for each treatment

sigma

population standard deviation

sig_level

significance level

power_sampleSize

A tibble with number of observations n, N is the sample size and power pwr

Examples

1
2
3
4
5
6
# Power
pwr_anova_balanced(group_means  = c(15, 20, 25, 30, 35), mean = 15,
sigma = 5,  pwr = NULL, n = 10, sig_level = 0.05)
# Sample size
pwr_anova_balanced(group_means  = c(15, 20, 25, 30, 35), mean = 15,
sigma = 5,  pwr = 0.95, n = NULL, sig_level = 0.05)

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