EVOLUTION-MANAGER
Edit File: power.anova.test.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Power Calculations for Balanced One-Way Analysis of Variance...</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for power.anova.test {stats}"><tr><td>power.anova.test {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Power Calculations for Balanced One-Way Analysis of Variance Tests</h2> <h3>Description</h3> <p>Compute power of test or determine parameters to obtain target power. </p> <h3>Usage</h3> <pre> power.anova.test(groups = NULL, n = NULL, between.var = NULL, within.var = NULL, sig.level = 0.05, power = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>groups</code></td> <td> <p>Number of groups</p> </td></tr> <tr valign="top"><td><code>n</code></td> <td> <p>Number of observations (per group)</p> </td></tr> <tr valign="top"><td><code>between.var</code></td> <td> <p>Between group variance</p> </td></tr> <tr valign="top"><td><code>within.var</code></td> <td> <p>Within group variance</p> </td></tr> <tr valign="top"><td><code>sig.level</code></td> <td> <p>Significance level (Type I error probability)</p> </td></tr> <tr valign="top"><td><code>power</code></td> <td> <p>Power of test (1 minus Type II error probability)</p> </td></tr> </table> <h3>Details</h3> <p>Exactly one of the parameters <code>groups</code>, <code>n</code>, <code>between.var</code>, <code>power</code>, <code>within.var</code>, and <code>sig.level</code> must be passed as NULL, and that parameter is determined from the others. Notice that <code>sig.level</code> has non-NULL default so NULL must be explicitly passed if you want it computed. </p> <h3>Value</h3> <p>Object of class <code>"power.htest"</code>, a list of the arguments (including the computed one) augmented with <code>method</code> and <code>note</code> elements. </p> <h3>Note</h3> <p><code>uniroot</code> is used to solve power equation for unknowns, so you may see errors from it, notably about inability to bracket the root when invalid arguments are given. </p> <h3>Author(s)</h3> <p>Claus Ekstrøm</p> <h3>See Also</h3> <p><code><a href="anova.html">anova</a></code>, <code><a href="lm.html">lm</a></code>, <code><a href="uniroot.html">uniroot</a></code></p> <h3>Examples</h3> <pre> power.anova.test(groups = 4, n = 5, between.var = 1, within.var = 3) # Power = 0.3535594 power.anova.test(groups = 4, between.var = 1, within.var = 3, power = .80) # n = 11.92613 ## Assume we have prior knowledge of the group means: groupmeans <- c(120, 130, 140, 150) power.anova.test(groups = length(groupmeans), between.var = var(groupmeans), within.var = 500, power = .90) # n = 15.18834 </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>