pwr2-package: Power and Sample Size Analysis for One-way and Two-way ANOVA...

Description Details Author(s) References Examples

Description

User friendly functions for power and sample size analysis at one-way and two-way ANOVA settings take either effect size or delta and sigma as arguments. They are designed for both one-way and two-way ANOVA settings. In addition, a function for plotting power curves is available for power comparison, which can be easily visualized by statisticians and clinical researchers.

Details

Package: SPA
Type: Package
Version: 1.0
Date: 2017-05-01
License: GPL-2

There are major five functions in the package. The pwr.1way and pwr.2way functions provide the power analysis for one-way and two-way ANOVA models. The ss.1way and ss.2way functions provide the sample size calculation for one-way and two-way ANOVA models. The pwr.plot function illustrates drawing power curves for different parameter settings.

Author(s)

Pengcheng Lu, Junhao Liu, and Devin Koestler.

Maintainer:Pengcheng Lu <plu2@kumc.edu>

References

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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)
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)

## Example 2
ss.2way(a=3, b=3, alpha=0.05, beta=0.1, delta.A=1, delta.B=2, sigma.A=2, sigma.B=2, B=100)

## Example 3
n <- seq(2, 30, by=4)
f <- seq(0.1, 1.0, length.out=10)
pwr.plot(n=n, k=5, f=f, alpha=0.05)

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 sample size adjustment 

              a = 3
              b = 3
      sig.level = 0.05
          power = 0.9
              n = 35

NOTE: n is number in each group, total sample = 315

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