EVOLUTION-MANAGER
Edit File: oneway.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: Test for Equal Means in a One-Way Layout</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 oneway.test {stats}"><tr><td>oneway.test {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Test for Equal Means in a One-Way Layout</h2> <h3>Description</h3> <p>Test whether two or more samples from normal distributions have the same means. The variances are not necessarily assumed to be equal. </p> <h3>Usage</h3> <pre> oneway.test(formula, data, subset, na.action, var.equal = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>formula</code></td> <td> <p>a formula of the form <code>lhs ~ rhs</code> where <code>lhs</code> gives the sample values and <code>rhs</code> the corresponding groups.</p> </td></tr> <tr valign="top"><td><code>data</code></td> <td> <p>an optional matrix or data frame (or similar: see <code><a href="model.frame.html">model.frame</a></code>) containing the variables in the formula <code>formula</code>. By default the variables are taken from <code>environment(formula)</code>.</p> </td></tr> <tr valign="top"><td><code>subset</code></td> <td> <p>an optional vector specifying a subset of observations to be used.</p> </td></tr> <tr valign="top"><td><code>na.action</code></td> <td> <p>a function which indicates what should happen when the data contain <code>NA</code>s. Defaults to <code>getOption("na.action")</code>.</p> </td></tr> <tr valign="top"><td><code>var.equal</code></td> <td> <p>a logical variable indicating whether to treat the variances in the samples as equal. If <code>TRUE</code>, then a simple F test for the equality of means in a one-way analysis of variance is performed. If <code>FALSE</code>, an approximate method of Welch (1951) is used, which generalizes the commonly known 2-sample Welch test to the case of arbitrarily many samples.</p> </td></tr> </table> <h3>Details</h3> <p>If the right-hand side of the formula contains more than one term, their interaction is taken to form the grouping. </p> <h3>Value</h3> <p>A list with class <code>"htest"</code> containing the following components: </p> <table summary="R valueblock"> <tr valign="top"><td><code>statistic</code></td> <td> <p>the value of the test statistic.</p> </td></tr> <tr valign="top"><td><code>parameter</code></td> <td> <p>the degrees of freedom of the exact or approximate F distribution of the test statistic.</p> </td></tr> <tr valign="top"><td><code>p.value</code></td> <td> <p>the p-value of the test.</p> </td></tr> <tr valign="top"><td><code>method</code></td> <td> <p>a character string indicating the test performed.</p> </td></tr> <tr valign="top"><td><code>data.name</code></td> <td> <p>a character string giving the names of the data.</p> </td></tr> </table> <h3>References</h3> <p>B. L. Welch (1951). On the comparison of several mean values: an alternative approach. <em>Biometrika</em>, <b>38</b>, 330–336. doi: <a href="https://doi.org/10.2307/2332579">10.2307/2332579</a>. </p> <h3>See Also</h3> <p>The standard t test (<code><a href="t.test.html">t.test</a></code>) as the special case for two samples; the Kruskal-Wallis test <code><a href="kruskal.test.html">kruskal.test</a></code> for a nonparametric test for equal location parameters in a one-way layout. </p> <h3>Examples</h3> <pre> ## Not assuming equal variances oneway.test(extra ~ group, data = sleep) ## Assuming equal variances oneway.test(extra ~ group, data = sleep, var.equal = TRUE) ## which gives the same result as anova(lm(extra ~ group, data = sleep)) </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>