<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/oneway-anova-explanation-and-example-in-r-part-1/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://datascienceplus.com/oneway-anova-explanation-and-example-in-r-part-1/"> R Programming – DataScience+</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>This tutorial was inspired by a <a rel="nofollow" href="https://datascienceplus.com/one-way-anova-in-r/" target="_blank">this post</a> published at DataScience+ by <a rel="nofollow" href="https://datascienceplus.com/author/bidyut-ghosh/" target="_blank">Bidyut Ghosh</a>. Special thanks also to Dani Navarro, The University of New South Wales (Sydney) for the book <a rel="nofollow" href="http://dj-navarro.appspot.com/lsr/lsr-0.5.1.pdf" target="_blank">Learning Statistics with R</a> (hereafter simply LSR) and the lsr packages available through CRAN. I highly recommend it.</p>
<h3>Let’s load the required R packages</h3>
<pre>library(ggplot2)
library(lsr)
library(psych)
library(car)
library(tidyverse)
library(dunn.test)
library(BayesFactor)
library(scales)
library(knitr)
library(kableExtra)
options(width = 130)
options(knitr.table.format = &quot;html&quot;)</pre>
<h2>The Oneway Analysis of Variance (ANOVA)</h2>
<p>The Oneway ANOVA is a statistical technique that allows us to compare mean differences of one outcome (dependent) variable across two or more groups (levels) of one independent variable (factor). If there are only two levels (e.g. Male/Female) of the independent (predictor) variable the results are analogous to Student’s t-test. It is also true that ANOVA is a special case of the GLM or regression models so as the number of levels increases it might make more sense to try one of those approaches. ANOVA also allows for comparisons of mean differences across multiple factors (Factorial or Nway ANOVA) which we won’t address here.</p>
<h3>Our scenario and data</h3>
<p><a rel="nofollow" href="https://datascienceplus.com/author/bidyut-ghosh/" target="_blank">Professor Ghosh’s</a> original scenario can be summarized this way. Imagine that you are interested in understanding whether knowing the brand of car tire can help you predict whether you will get more or less mileage before you need to replace them. We’ll draw what is hopefully a random sample of 60 tires from four different manufacturers and use the mean mileage by brand to help inform our thinking. While we expect variation across our sample we’re interested in whether the differences between the tire brands (the groups) is significantly different than what we would expect in random variation within the groups.</p>
<p>Our research or testable hypothesis is then described <span>\[\mu_{Apollo} \ne \mu_{Bridgestone} \ne \mu_{CEAT} \ne \mu_{Falken}\]</span> as at least one of the tire brand populations is different than the other three. Our null is basically “nope, brand doesn’t matter in predicting tire mileage – all brands are the same”.<br>
He provides the following data set with 60 observations. I’ve chosen to download directly but you could of course park the file locally and work from there.</p>
<table>
<thead>
<tr>
<th>Column</th>
<th>Contains</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>Brands</td>
<td>What brand tyre</td>
<td>factor</td>
</tr>
<tr>
<td>Mileage</td>
<td>Tyre life in thousands</td>
<td>num</td>
</tr>
</tbody>
</table>
<pre>tyre&lt;-read.csv(&quot;https://datascienceplus.com/wp-content/uploads/2017/08/tyre.csv&quot;)
# tyre&lt;-read.csv(&quot;tyre.csv&quot;) # if you have it on your local hard drive
str(tyre)
<em>## 'data.frame': 60 obs. of 2 variables:
## $ Brands : Factor w/ 4 levels &quot;Apollo&quot;,&quot;Bridgestone&quot;,..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Mileage: num 33 36.4 32.8 37.6 36.3 ...</em></pre>
<pre>summary(tyre)
<em>## Brands Mileage ## Apollo :15 Min. :27.88 ## Bridgestone:15 1st Qu.:32.69 ## CEAT :15 Median :34.84 ## Falken :15 Mean :34.74 ## 3rd Qu.:36.77 ## Max. :41.05</em></pre>
<pre>head(tyre)
<em>## Brands Mileage
## 1 Apollo 32.998
## 2 Apollo 36.435
## 3 Apollo 32.777
## 4 Apollo 37.637
## 5 Apollo 36.304
## 6 Apollo 35.915</em></pre>
<p><code>View(tyre)</code> if you use RStudio this is a nice way to see the data in spreadsheet format<br>
The data set contains what we expected. The dependent variable <code>Mileage</code> is numeric and the independent variable <code>Brand</code> is of type factor. R is usually adept at coercing a chr string or an integer as the independent variable but I find it best to explicitly make it a factor when you’re working on ANOVAs.</p>
<p>Let’s graph and describe the basics. First a simple <code>boxplot</code> of all 60 data points along with a summary using the <code>describe</code> command from the package <code>psych</code>. Then in reverse order lets describe <code>describeBy</code> and boxplot breaking it down by group (in our case tire brand).</p>
<pre>boxplot(tyre$Mileage, 
        horizontal = TRUE, 
        main=&quot;Mileage distribution across all brands&quot;,
        col = &quot;blue&quot;)

describe(tyre) # the * behind Brands reminds us it's a factor and some of the numbers are nonsensical
<em>## vars n mean sd median trimmed mad min max range skew kurtosis se
## Brands* 1 60 2.50 1.13 2.50 2.50 1.48 1.00 4.00 3.00 0.00 -1.41 0.15
## Mileage 2 60 34.74 2.98 34.84 34.76 3.09 27.88 41.05 13.17 -0.11 -0.44 0.38</em></pre>
<p><a rel="nofollow" href="https://i0.wp.com/datascienceplus.com/wp-content/uploads/2017/09/Unknown1.png?ssl=1" target="_blank"><img alt="" src="https://i2.wp.com/datascienceplus.com/wp-content/uploads/2017/09/Unknown1-490x245.png?w=450&ssl=1" class="wp-image-8524" data-recalc-dims="1"></a></p>
<pre>describeBy(tyre$Mileage,group = tyre$Brand, mat = TRUE, digits = 2)
<em>## item group1 vars n mean sd median trimmed mad min max range skew kurtosis se
## X11 1 Apollo 1 15 34.80 2.22 34.84 34.85 2.37 30.62 38.33 7.71 -0.18 -1.24 0.57
## X12 2 Bridgestone 1 15 31.78 2.20 32.00 31.83 1.65 27.88 35.01 7.13 -0.29 -1.05 0.57
## X13 3 CEAT 1 15 34.76 2.53 34.78 34.61 2.03 30.43 41.05 10.62 0.64 0.33 0.65
## X14 4 Falken 1 15 37.62 1.70 37.38 37.65 1.18 34.31 40.66 6.35 0.13 -0.69 0.44</em></pre>
<pre>boxplot(tyre$Mileage~tyre$Brands, 
        main=&quot;Boxplot comparing Mileage of Four Brands of Tyre&quot;, 
        col= rainbow(4), 
        horizontal = TRUE)</pre>
<p><a rel="nofollow" href="https://i0.wp.com/datascienceplus.com/wp-content/uploads/2017/09/Unknown2.png?ssl=1" target="_blank"><img alt="" src="https://i0.wp.com/datascienceplus.com/wp-content/uploads/2017/09/Unknown2-490x245.png?w=450&ssl=1" class="wp-image-8525" data-recalc-dims="1"></a></p>
<p>Let’s format the table <code>describeby</code> generates to make it a little nicer using the <code>kable</code> package. Luckily <code>describeby</code> generates a dataframe with <code>mat=TRUE</code> and after that we can select which columns to publish (dropping some of the less used) as well as changing the column labels as desired.</p>
<pre>describeBy(tyre$Mileage,group = tyre$Brand, mat = TRUE) %>% #create dataframe
  select(Brand=group1, N=n, Mean=mean, SD=sd, Median=median, Min=min, Max=max, 
                Skew=skew, Kurtosis=kurtosis, SEM=se) %>% 
  kable(align=c(&quot;lrrrrrrrr&quot;), digits=2, row.names = FALSE,
        caption=&quot;Tire Mileage Brand Descriptive Statistics&quot;) %>% 
  kable_styling(bootstrap_options=c(&quot;bordered&quot;, &quot;responsive&quot;,&quot;striped&quot;), full_width = FALSE)</pre>
<table>
<caption>
Tire Mileage Brand Descriptive Statistics<br>
</caption>
<thead>
<tr>
<th>
Brand
</th>
<th>
N
</th>
<th>
Mean
</th>
<th>
SD
</th>
<th>
Median
</th>
<th>
Min
</th>
<th>
Max
</th>
<th>
Skew
</th>
<th>
Kurtosis
</th>
<th>
SEM
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Apollo
</td>
<td>
15
</td>
<td>
34.80
</td>
<td>
2.22
</td>
<td>
34.84
</td>
<td>
30.62
</td>
<td>
38.33
</td>
<td>
-0.18
</td>
<td>
-1.24
</td>
<td>
0.57
</td>
</tr>
<tr>
<td>
Bridgestone
</td>
<td>
15
</td>
<td>
31.78
</td>
<td>
2.20
</td>
<td>
32.00
</td>
<td>
27.88
</td>
<td>
35.01
</td>
<td>
-0.29
</td>
<td>
-1.05
</td>
<td>
0.57
</td>
</tr>
<tr>
<td>
CEAT
</td>
<td>
15
</td>
<td>
34.76
</td>
<td>
2.53
</td>
<td>
34.78
</td>
<td>
30.43
</td>
<td>
41.05
</td>
<td>
0.64
</td>
<td>
0.33
</td>
<td>
0.65
</td>
</tr>
<tr>
<td>
Falken
</td>
<td>
15
</td>
<td>
37.62
</td>
<td>
1.70
</td>
<td>
37.38
</td>
<td>
34.31
</td>
<td>
40.66
</td>
<td>
0.13
</td>
<td>
-0.69
</td>
<td>
0.44
</td>
</tr>
</tbody>
</table>
<p>Certainly much nicer looking and I only scratched the surface of the options available. We can certainly look at the numbers and learn a lot. But let’s see if we can also improve our plotting to be more informative.<br>
The more I use <code>ggplot2</code> the more I love the ability to use it to customize the presentation of the data to optimize understanding! The next plot might be accused of being a little “busy” but essentially answers our Oneway ANOVA question in one picture (note that I have stayed with the original decision to set <span>\(\alpha\)</span> = 0.01 significance level (99% confidence intervals)).</p>
<pre>ggplot(tyre, aes(reorder(Brands,Mileage),Mileage,fill=Brands))+
# ggplot(tyre, aes(Brands,Mileage,fill=Brands))+ # if you want to leave them alphabetic
  geom_jitter(colour = &quot;dark gray&quot;,width=.1) +
  stat_boxplot(geom ='errorbar',width = 0.4) +
  geom_boxplot()+
  labs(title=&quot;Boxplot, dotplot and SEM plot of mileage for four brands of tyres&quot;, 
       x = &quot;Brands (sorted)&quot;,
       y = &quot;Mileage (in thousands)&quot;,
       subtitle =&quot;Gray dots=sample data points, Black dot=outlier, Blue dot=mean, Red=99% confidence interval&quot;,
       caption = &quot;Data from https://datascienceplus.com/one-way-anova-in-r/&quot;) +
  guides(fill=FALSE) +
  stat_summary(fun.data = &quot;mean_cl_normal&quot;, colour = &quot;red&quot;, size = 1.5, fun.args = list(conf.int=.99)) +
  stat_summary(geom=&quot;point&quot;, fun.y=mean, color=&quot;blue&quot;) +
  theme_bw()</pre>
<p><a rel="nofollow" href="https://i0.wp.com/datascienceplus.com/wp-content/uploads/2017/09/Unknown3.png?ssl=1" target="_blank"><img sizes="(max-width: 490px) 100vw, 490px" src="https://i2.wp.com/datascienceplus.com/wp-content/uploads/2017/09/Unknown3-490x245.png?w=450&ssl=1" alt="" class="wp-image-8530" data-recalc-dims="1"></a></p>
<p>By simple visual inspection it certainly appears that we have evidence of the effect of tire brand on mileage. There is one outlier for the CEAT brand but little cause for concern. Means and medians are close together so no major concerns about skewness. Different brands have differing amounts of variability but nothing shocking visually.</p>
<h3>Oneway ANOVA Test &amp; Results</h3>
<p>So the heart of this post is to actually execute the Oneway ANOVA in R. There are several ways to do so but let’s start with the simplest from the base R first <code>aov</code>. While it’s possible to wrap the command in a <code>summary</code> or <code>print</code> statement I recommend you always save the results out to an R object in this case <code>tyres.aov</code>. It’s almost inevitable that further analysis will ensue and the <code>tyres.aov</code> object has a wealth of useful information. If you’re new to R a couple of quick notes. The dependent variable goes to the left of the tilde and our independent or predictor variable to the right. <code>aov</code> is not limited to Oneway ANOVA so adding additional factors is possible.<br>
As I mentioned earlier ANOVA is a specialized case of the GLM and therefore the list object returned tyres.aov is actually of both <code>aov</code> and <code>lm</code> class. The <code>names</code> command will give you some sense of all the information contained in the list object. We’ll access some of this later as we continue to analyze our data. The <code>summary</code> command gives us the key ANOVA data we need and produces a classic ANOVA table. If you’re unfamiliar with them and want to know more especially where the numbers come from I recommend a good introductory stats text. As noted earlier I recommend <em>Learning Statistics with R</em> <a rel="nofollow" href="http://dj-navarro.appspot.com/lsr/lsr-0.5.1.pdf" target="_blank">LSR</a> see Table 14-1 on page 432.</p>
<pre>tyres.aov&lt;- aov(Mileage~Brands, tyre)
class(tyres.aov)
<em>## [1] &quot;aov&quot; &quot;lm&quot;</em></pre>
<pre>typeof(tyres.aov)
## [1] &quot;list&quot;</pre>
<pre>names(tyres.aov)
<em>## [1] &quot;coefficients&quot; &quot;residuals&quot; &quot;effects&quot; &quot;rank&quot; &quot;fitted.values&quot; &quot;assign&quot; &quot;qr&quot; ## [8] &quot;df.residual&quot; &quot;contrasts&quot; &quot;xlevels&quot; &quot;call&quot; &quot;terms&quot; &quot;model&quot;</em></pre>
<pre>summary(tyres.aov)
<em>## Df Sum Sq Mean Sq F value Pr(>F) ## Brands 3 256.3 85.43 17.94 2.78e-08 ***
## Residuals 56 266.6 4.76 ## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1</em></pre>
<p>We can reject the null hypothesis at the <span>\(\alpha\)</span> = 0.01 significance level (99% confidence). The F statistic is calculated as <span>\[F = \frac{MS_{between}}{MS_{within}}\]</span> and the table gives us the precise p value and the common asterisks to show “success”.<br>
In published results format that probably looks like “a Oneway ANOVA showed a significant effect for brand on tire mileage, F(3,56)=17.94, p&lt;.01”. In other words, we can reject the null hypothesis that these data came from brand tire populations where the average tire mileage life was the same! Making it a prediction statement, we can see that brand type helps predict mileage life.<br>
That’s exciting news, but leaves us with some other unanswered questions.<br>
The data provide support for the hypothesis that the means aren’t all equal – that’s called the omnibus test. We have support for rejecting <span>\[\mu_{Apollo} = \mu_{Bridgestone} = \mu_{CEAT} = \mu_{Falken}\]</span> but at this point we can’t state with any authority which specific pairs are different, all we can say is that at least one is different! When we look at the graph we made earlier we can guess we know but let’s do better than that. How can we use confidence intervals to help us understand whether the data are indicating simple random variation or whether the underlying population is different. We just need to compute the confidence interval for each brand’s mean and then see which brand means lie inside or outside the confidence interval of the others. We would expect that if we ran our experiment 100 times with our sample size numbers for each brand the mileage mean would lie <em>inside</em> the upper and lower limit of our confidence interval 99 times (with <span>\(\alpha\)</span> = 0.01) out of those 100 times. If our data shows it outside the confidence interval that is evidence of a statistically significant difference for that specific pairing.<br>
But we don’t have to rely on our graph, we can be more precise and test it in a very controlled fashion.</p>
<h3>A priori and post hoc comparisons</h3>
<p>We could just take mileage and brands and run all the possible t tests. There would be 6 of them; Apollo -v- Bridgestone, Apollo -v- CEAT, Apollo -v- Falken, Bridgestone -v- CEAT, Bridgestone -v- Falken, and CEAT -v- Falken. Base R provides <code>pairwise.t.test</code> to feed it the data and allow it to rapidly make all the relevant comparisons. <code>lsr</code> provides a helper function that makes it possible to simply feed it the aov object and do the same.<br>
The “answers” appear to support our read of the graph. All of the possible pairs seem to be different other than Apollo -v- CEAT which is what the graph shows. The significance levels R spits out are all much smaller than <code>p&lt;.01</code>. Break out the champagne start the victory dance.</p>
<pre>pairwise.t.test(tyre$Mileage,tyre$Brands,p.adjust.method = &quot;none&quot;)
<em>## ## Pairwise comparisons using t tests with pooled SD ## ## data: tyre$Mileage and tyre$Brands ## ## Apollo Bridgestone CEAT ## Bridgestone 0.00037 - - ## CEAT 0.96221 0.00043 - ## Falken 0.00080 9.7e-10 0.00069
## ## P value adjustment method: none</em></pre>
<pre># unfortunately pairwise.t.test doesn't accept formula style or an aov object
# lsr library to the rescue
posthocPairwiseT(tyres.aov,p.adjust.method = &quot;none&quot;) #equivalent just easier to use the aov object 
<em>## ## Pairwise comparisons using t tests with pooled SD ## ## data: Mileage and Brands ## ## Apollo Bridgestone CEAT ## Bridgestone 0.00037 - - ## CEAT 0.96221 0.00043 - ## Falken 0.00080 9.7e-10 0.00069
## ## P value adjustment method: none</em></pre>
<p>But that would be <em>wrong</em> and here’s why. Assuming we want to have 99% confidence again, across all six unique pairings, we are “cheating” if we don’t adjust the rejection region (and our confidence intervals) and just run the test six times. It’s analogous to rolling the die six times instead of once. The more simultaneous tests we run the more likely we are to find a difference even though none exists. We need to adjust our thinking and our confidence to account for the fact that we are making multiple comparisons (a.k.a. simultaneous comparisons). Our confidence interval must be made wider (more conservative) to account for the fact we are making multiple simultaneous comparisons. Thank goodness the tools exist to do this for us. As a matter of fact there is no one single way to make the adjustment… there are many.<br>
One starting position is that it makes a difference whether you have specified (hypothesized) some specific relationships a priori (in advance) or whether you’re exploring posthoc (after the fact also called “fishing”). The traditional position is that a priori grants you more latitude and less need to be conservative. The only thing that is certain is that some adjustment is necessary. In his original post <a rel="nofollow" href="https://datascienceplus.com/author/bidyut-ghosh/" target="_blank">Professor Ghosh</a> applied one of the classical choices for making an adjustment Tukey’s Honestly Significant Difference (HSD) <a rel="nofollow" href="https://en.wikipedia.org/wiki/Tukey%27s_range_test" target="_blank">https://en.wikipedia.org/wiki/Tukey%27s_range_test</a>. Let’s reproduce his work first as two tables at two confidence levels.</p>
<pre>TukeyHSD(tyres.aov, conf.level = 0.95)
<em>## Tukey multiple comparisons of means
## 95% family-wise confidence level
## ## Fit: aov(formula = Mileage ~ Brands, data = tyre)
## ## $Brands
## diff lwr upr p adj
## Bridgestone-Apollo -3.01900000 -5.1288190 -0.909181 0.0020527
## CEAT-Apollo -0.03792661 -2.1477456 2.071892 0.9999608
## Falken-Apollo 2.82553333 0.7157143 4.935352 0.0043198
## CEAT-Bridgestone 2.98107339 0.8712544 5.090892 0.0023806
## Falken-Bridgestone 5.84453333 3.7347143 7.954352 0.0000000
## Falken-CEAT 2.86345994 0.7536409 4.973279 0.0037424</em></pre>
<pre>TukeyHSD(tyres.aov, conf.level = 0.99)
<em>## Tukey multiple comparisons of means
## 99% family-wise confidence level
## ## Fit: aov(formula = Mileage ~ Brands, data = tyre)
## ## $Brands
## diff lwr upr p adj
## Bridgestone-Apollo -3.01900000 -5.6155816 -0.4224184 0.0020527
## CEAT-Apollo -0.03792661 -2.6345082 2.5586550 0.9999608
## Falken-Apollo 2.82553333 0.2289517 5.4221149 0.0043198
## CEAT-Bridgestone 2.98107339 0.3844918 5.5776550 0.0023806
## Falken-Bridgestone 5.84453333 3.2479517 8.4411149 0.0000000
## Falken-CEAT 2.86345994 0.2668783 5.4600415 0.0037424</em></pre>
<p>A lot of output there but not too difficult to understand. We can see the 6 pairings we have been tracking listed in the first column. The <code>diff</code> column is the difference between the means of the two brands listed. So the mean for Bridgestone is 3,019 miles less than Apollo. The <code>lwr</code> and <code>upr</code> columns show the lower and upper CI limits. Notice they change between the two different confidence levels we’ve run, whereas the mean difference and exact p value do not. So good news here is that even with our more conservative Tukey HSD test we have empirical support for 5 out of the 6 possible differences.</p>
<p>Now let’s graph just the .99 CI version.</p>
<pre>par()$oma # current margins
<em>## [1] 0 0 0 0</em></pre>
<pre>par(oma=c(0,5,0,0)) # adjust the margins because the factor names are long
plot(TukeyHSD(tyres.aov, conf.level = 0.99),las=1, col = &quot;red&quot;)
par(oma=c(0,0,0,0)) # put the margins back</pre>
<p><a rel="nofollow" href="https://i0.wp.com/datascienceplus.com/wp-content/uploads/2017/09/Unknown4.png?ssl=1" target="_blank"><img sizes="(max-width: 490px) 100vw, 490px" src="https://i0.wp.com/datascienceplus.com/wp-content/uploads/2017/09/Unknown4-490x350.png?w=450&ssl=1" alt="" class="wp-image-8532" data-recalc-dims="1"></a></p>
<p>If you’re a visual learner, as I am, this helps. We’re looking at the differences in means amongst the pairs of brands. 0 on the x axis means no difference at all and the red horizontals denote 99% confidence intervals.<br>
Finally, as I mentioned earlier there are many different ways (tests) for adjusting. Tukey HSD is very common and is easy to access and graph. But two others worth noting are the Bonferroni and it’s successor the Holm. Let’s go back to our earlier use of the pairwise.t.test. We’ll use it again (as well as the <code>lsr</code> wrapper function <code>posthocPairwise</code>). You can use the built-in R help for <code>p.adjust</code> to see all the methods available. I recommend <code>holm</code> as a general position but know your options.</p>
<pre>pairwise.t.test(tyre$Mileage,tyre$Brands,p.adjust.method = &quot;bonferroni&quot;)
<em>## ## Pairwise comparisons using t tests with pooled SD ## ## data: tyre$Mileage and tyre$Brands ## ## Apollo Bridgestone CEAT ## Bridgestone 0.0022 - - ## CEAT 1.0000 0.0026 - ## Falken 0.0048 5.8e-09 0.0041
## ## P value adjustment method: bonferroni</em></pre>
<pre>pairwise.t.test(tyre$Mileage,tyre$Brands,p.adjust.method = &quot;holm&quot;)
<em>## ## Pairwise comparisons using t tests with pooled SD ## ## data: tyre$Mileage and tyre$Brands ## ## Apollo Bridgestone CEAT ## Bridgestone 0.0019 - - ## CEAT 0.9622 0.0019 - ## Falken 0.0021 5.8e-09 0.0021
## ## P value adjustment method: holm</em></pre>
<pre>posthocPairwiseT(tyres.aov) # default is Holm
<em>## ## Pairwise comparisons using t tests with pooled SD ## ## data: Mileage and Brands ## ## Apollo Bridgestone CEAT ## Bridgestone 0.0019 - - ## CEAT 0.9622 0.0019 - ## Falken 0.0021 5.8e-09 0.0021
## ## P value adjustment method: holm</em></pre>
<p>Happily, given our data, we get the same overall answer with very slightly different numbers. As it turns out we have very strong effect sizes and the tests don’t change our overall answers. Wait what’s an effect size you ask? That’s our next question which we will cover in the second part.</p>
<ul></ul>
<p><strong>
<p>Related Post</p>
<p>
<ol>
<li><a rel="nofollow" href="https://datascienceplus.com/one-way-anova-in-r/" title="Permanent Link toOne-way ANOVA in R" target="_blank">One-way ANOVA in R</a></li>
<li><a rel="nofollow" href="https://datascienceplus.com/cubic-and-smoothing-splines-in-r/" title="Permanent Link toCubic and Smoothing Splines in R" target="_blank">Cubic and Smoothing Splines in R</a></li>
<li><a rel="nofollow" href="https://datascienceplus.com/chi-squared-test-in-r/" title="Permanent Link toChi-Squared Test – The Purpose, The Math, When and How to Implement?" target="_blank">Chi-Squared Test – The Purpose, The Math, When and How to Implement?</a></li>
<li><a rel="nofollow" href="https://datascienceplus.com/missing-value-treatment/" title="Permanent Link toMissing Value Treatment" target="_blank">Missing Value Treatment</a></li>
<li><a rel="nofollow" href="https://datascienceplus.com/r-for-publication-by-page-piccinini/" title="Permanent Link toR for Publication by Page Piccinini" target="_blank">R for Publication by Page Piccinini</a></li>
</ol></strong>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://datascienceplus.com/oneway-anova-explanation-and-example-in-r-part-1/"> R Programming – DataScience+</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/Llv-7jrY9jE" height="1"></a></div>