pwr.2way: Power calculation for balanced two-way ANOVA models

Description Usage Arguments Details Value Author(s) References Examples

View source: R/pwr.2way.R

Description

Calculate power for two-way ANOVA models.

Usage

1
2
pwr.2way(a=a, b=b, alpha=alpha, size.A=size.A, size.B=size.B, f.A=NULL, f.B=NULL, 
delta.A=NULL, delta.B=NULL, sigma.A=NULL, sigma.B=NULL)

Arguments

a

Number of groups in Factor A

b

Number of groups in Factor B

alpha

Significant level (Type I error probability)

size.A

Sample size per group in Factor A

size.B

Sample size per group in Factor B

f.A

Effect size of Factor A

f.B

Effect size of Factor B

delta.A

The smallest difference among a groups in Factor A

delta.B

The smallest difference among b groups in Factor B

sigma.A

Standard deviation, i.e. square root of variance in Factor A

sigma.B

Standard deviation, i.e. square root of variance in Factor B

Details

If effect sizes f.A and f.B are known, plug them in to the function; If delta.A and sigma.A are known instead of f.A, put NULL to f.A. Similarly as delta.B and sigma.B.

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
7
## Example 1
pwr.2way(a=3, b=3, alpha=0.05, size.A=4, size.B=5, f.A=0.8, f.B=0.4)

## Example 2
pwr.2way(a=3, b=3, alpha=0.05, size.A=4, size.B=5, delta.A=4, delta.B=2, sigma.A=2, sigma.B=2)
pwr.2way(a=3, b=3, alpha=0.05, size.A=4, size.B=5, f.A=NULL, f.B=NULL, 
delta.A=4, delta.B=2, sigma.A=2, sigma.B=2)

Example output

     Balanced two-way analysis of variance power calculation 

              a = 3
              b = 3
            n.A = 4
            n.B = 5
      sig.level = 0.05
        power.A = 0.9883206
        power.B = 0.6333554
          power = 0.6333554

NOTE: power is the minimum power among two factors


     Balanced two-way analysis of variance power calculation 

              a = 3
              b = 3
            n.A = 4
            n.B = 5
      sig.level = 0.05
        power.A = 0.9908543
        power.B = 0.6523857
          power = 0.6523857

NOTE: power is the minimum power among two factors


     Balanced two-way analysis of variance power calculation 

              a = 3
              b = 3
            n.A = 4
            n.B = 5
      sig.level = 0.05
        power.A = 0.9908543
        power.B = 0.6523857
          power = 0.6523857

NOTE: power is the minimum power among two factors

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