Plot a diagram to illustrate the relationship of sample size and test power for a given set of parameters.

1 2 |

`x` |
object of class power.htest usually created by one of the power calculation functions, e.g., pwr.t.test() |

`...` |
Arguments to be passed to |

Power calculations for the following tests are supported: t-test (pwr.t.test(), pwr.t2n.test()), chi squared test (pwr.chisq.test()), one-way ANOVA (pwr.anova.test(), standard normal distribution (pwr.norm.test()), pearson correlation (pwr.r.test()), proportions (pwr.p.test(), pwr.2p.test(), pwr.2p2n.test()))

These functions are invoked for their side effect of drawing on the active graphics device.

By default it attempts to use the plotting tools of ggplot2 and scales. If they are not installed, it will use the basic R plotting tools.

Stephan Weibelzahl <weibelzahl@pfh.de>

`pwr.t.test`

, `pwr.p.test`

, `pwr.2p.test`

,
`pwr.2p2n.test`

, `pwr.r.test`

, `pwr.chisq.test`

,
`pwr.anova.test`

, `pwr.t2n.test`

1 2 3 4 | ```
## Two-sample t-test
p.t.two <- pwr.t.test(d=0.3, power=0.8, type="two.sample", alternative="two.sided")
plot(p.t.two)
plot(p.t.two, xlab="sample size per group")
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.