RM | Unit 230 - ANOVA, F test, and Sums of squares + Unit 235 - F statistic, F distribution, and
degrees of freedom
Book: Analysing data using linear models
Chapter 6: 6.8, 6.9, 6.10, 6.12
Chapter 6.8: Analysis of Variance
Since we know that applying a linear model to a categorical independent variable is the same as
modelling group means, we can test the null-hypothesis that all group means are equal in the population.
Let µt1 be the mean yield in the population of the treatment 1 group, µt2 be the mean yield in the
treatment 2 group, and µc be the mean yield in the control group. Then we can specify the null-hypothesis
using symbols in the following way: H0 : µt1 = µt2 = µc.
If all group means are equal in the
population, then all population slopes would be 0.
We want to test this null-hypothesis with a linear
model in R. We then have only one independent
variable, group, and if we let R do the dummy
coding for us, R can give us an Analysis of Variance.
We do that in the following way: →
We don’t see a regression table, but output based on a so-called Analysis Of VAriance, or
ANOVA for short. This table is usually called an ANOVA table.
In the output, you see a column statistic, with the value 4.85 for the group variable. It looks
similar to the column with the t-statistic in a regression table, but it isn’t. The statistic is an F-statistic.The
F-statistic is constructed on the basis of Sum of Squares (SS, sumsq in the R table).
In the ANOVA table, we also see degrees of freedom (df). The degrees of
freedom in the row named Residuals are the residual degrees of freedom that we
already use when doing linear regression (Chapter 5). Here we see the residual
degrees of freedom equals 27. This is so because we have 30 data points, and for a
linear model the number of degrees of freedom is n− K −1 = 30−2−1 = 27, with K
being the number of independent variables (two dummy variables).
→ Continuing, we see Mean Squares (meansq). These numbers are nothing but the sum of
squares (sumsq) divided by the respective degrees of freedom (df).
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller kayleighdebruin1. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $3.20. You're not tied to anything after your purchase.