pwr.plot: Power curves for different parameter settings (sample size...

Description Usage Arguments Details Author(s) References Examples

View source: R/pwr.plot.R

Description

Draw power curves for different parameter settings in balanced one-way ANOVA models.

Usage

1
pwr.plot(n=n, k=k, f=f, alpha=alpha)

Arguments

n

Sample size per group

k

Number of groups

f

Effect size

alpha

Significant level (Type I error probability)

Details

This function demonstrates drawing power curves for different sample size and effect size settings. N and f can be either a single value or a sequence of values, but they cannot be single values simultaneously. The combination of them could be (a sequence of n, a sequence of f), (a sequence of n, a single f), or (a single n, a sequence of f).

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
 8
 9
10
11
12
13
14
## Example 1
n <- seq(2, 30, by=4)
f <- 0.5
pwr.plot(n=n, k=5, f=f, alpha=0.05)

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

## 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



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