pwr.1way: Power calculation for balanced one-way ANOVA models

Description Usage Arguments Details Value Author(s) References Examples

View source: R/pwr.1way.R

Description

Calculate power for one-way ANOVA models.

Usage

1
pwr.1way(k=k, n=n, alpha=alpha, f=NULL, delta=delta, sigma=sigma)

Arguments

k

Number of groups

n

Sample size per group

f

Effect size

alpha

Significant level (Type I error probability)

delta

The smallest difference among k groups

sigma

Standard deviation, i.e. square root of variance

Details

If effect size f is known, plug it in to the function; If delta and sigma are known instead of effect size, put NULL to f.

Value

Object of class "power.htest", a list of the arguments (including the computed one) augmented with "method" and "note" elements.

Author(s)

Pengcheng Lu, Junhao Liu, and Devin Koestler.

References

Angela Dean & Daniel Voss (1999). Design and Analysis of Experiments. Springer.

Examples

1
2
3
4
5
6
## Example 1
pwr.1way(k=5, n=15, alpha=0.05, delta=1.5, sigma=1)
pwr.1way(k=5, n=15, f=NULL, alpha=0.05, delta=1.5, sigma=1)

## Example 2
pwr.1way(k=5, n=15, f=0.4, alpha=0.05)

Example output

     Balanced one-way analysis of variance power calculation 

              k = 5
              n = 15
          delta = 1.5
          sigma = 1
    effect.size = 0.4743416
      sig.level = 0.05
          power = 0.9074026

NOTE: n is number in each group, total sample = 75 power = 0.907402617505032


     Balanced one-way analysis of variance power calculation 

              k = 5
              n = 15
          delta = 1.5
          sigma = 1
    effect.size = 0.4743416
      sig.level = 0.05
          power = 0.9074026

NOTE: n is number in each group, total sample = 75 power = 0.907402617505032


     Balanced one-way analysis of variance power calculation 

              k = 5
              n = 15
    effect.size = 0.4
      sig.level = 0.05
          power = 0.771436

NOTE: n is number in each group, total sample = 75 power = 0.771435950291574

pwr2 documentation built on May 2, 2019, 10:16 a.m.