EVOLUTION-MANAGER
Edit File: power.t.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 one and two sample t tests</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.t.test {stats}"><tr><td>power.t.test {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Power calculations for one and two sample t tests</h2> <h3>Description</h3> <p>Compute the power of the one- or two- sample t test, or determine parameters to obtain a target power. </p> <h3>Usage</h3> <pre> power.t.test(n = NULL, delta = NULL, sd = 1, sig.level = 0.05, power = NULL, type = c("two.sample", "one.sample", "paired"), alternative = c("two.sided", "one.sided"), strict = FALSE, tol = .Machine$double.eps^0.25) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>n</code></td> <td> <p>number of observations (per group)</p> </td></tr> <tr valign="top"><td><code>delta</code></td> <td> <p>true difference in means</p> </td></tr> <tr valign="top"><td><code>sd</code></td> <td> <p>standard deviation</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> <tr valign="top"><td><code>type</code></td> <td> <p>string specifying the type of t test. Can be abbreviated.</p> </td></tr> <tr valign="top"><td><code>alternative</code></td> <td> <p>one- or two-sided test. Can be abbreviated.</p> </td></tr> <tr valign="top"><td><code>strict</code></td> <td> <p>use strict interpretation in two-sided case</p> </td></tr> <tr valign="top"><td><code>tol</code></td> <td> <p>numerical tolerance used in root finding, the default providing (at least) four significant digits.</p> </td></tr> </table> <h3>Details</h3> <p>Exactly one of the parameters <code>n</code>, <code>delta</code>, <code>power</code>, <code>sd</code>, and <code>sig.level</code> must be passed as <code>NULL</code>, and that parameter is determined from the others. Notice that the last two have non-NULL defaults, so NULL must be explicitly passed if you want to compute them. </p> <p>If <code>strict = TRUE</code> is used, the power will include the probability of rejection in the opposite direction of the true effect, in the two-sided case. Without this the power will be half the significance level if the true difference is zero. </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 the 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>Peter Dalgaard. Based on previous work by Claus Ekstrøm</p> <h3>See Also</h3> <p><code><a href="t.test.html">t.test</a></code>, <code><a href="uniroot.html">uniroot</a></code></p> <h3>Examples</h3> <pre> power.t.test(n = 20, delta = 1) power.t.test(power = .90, delta = 1) power.t.test(power = .90, delta = 1, alternative = "one.sided") </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>