ANOVA and Code variables
ANOVA as a regression model
An ANOVA is a special case of regression
To put it differently: A regression with categorical independent variables is equivalent to ANOVA.
ANOVA stands for: analysis of variance
- Categorical/nominal IVs: Variables for which each case is placed into one of several available
categories. (Example: Gender, treatment group in an experiment).
- Categories must be mutually exclusive and exhaustive.
- Categories are not necessarily ordered.
- Categorical/nominal IVs can be included in a multiple regression model.
- How? By using sets of code variables:
# categories = g (groups) =⇒ # code variables = (g − 1)
- How to code categorical IVs? We will see several procedures:
1. Dummy variable coding
2. Contrasts coding
How to choose and make code-variables?
- AKA: indicator variable, 0-1 variable, dummy variable
For every observation you code
z = 1 if the person is from a certain group (e.g., Male)
z = 0 if the person is not from a certain group (e.g, Female)
For more than two groups you need multiple dummy-variables
- Number of groups = g, then the number of code variables g – 1
- Overall effect does not depend on different coding systems (e.g., same R, R 2, F − test)
- interpretation of individual regression coefficients differs on different coding schemes
-
Dummy-variable coding; Also known as reference coding.
Reference coding: Assign one group as ‘reference group’.
- That group: All Ci = 0.
- Other groups: One Ci = 1 other Cj’s zero.
The reference group…
- should be useful for comparisons. (Example: Control group like the ‘placebo’ group in clinical
experiments).
- should be well defined (do not use dubious groups like ‘other’).
- should not have (much) smaller sample size than the other groups.
Remember: The choice of the reference group is based on research goals and not on statistical
reasons.
Dummy-variable coding: Interpreting bi ’s
Conclusion: In general,
a = MRef.group, the sample mean of reference group.
, bi = Mi − MRef.group, the difference between the sample mean of group i and the sample mean of the
reference group (i = 1, 2, . . .).
Note: The dummy variables Ci correlate, hence the bi ’s are partial regression coefficients (and the
sr2i ’s do not sum up to R2Y ).
Dummy coding is limited: Using dummy coding you can compare general group means with a
reference mean but what if you want to know about other mean differences? In this case you can
set-up planned comparisons using contrast coding.
Contrast coding:
Test hypotheses using contrasts (linear combinations of the groups means).
Follow these rules to uniformize contrast codings:
Advantage and disadvantages regression versus ANOVA
Disadvantage:
- It is more complicated
- A researcher might not always know what means he is interested in
Advantage:
- It is easier and more natural to combine continuous and categorical independent variables
- ANOVA will estimate all possible interactions and with regression there is less testing
o Thus, less data fishing or p-hacking as with regression hypotheses have to be
specified in advance
o Better control overall error rate
o Less type 1 errors
o More power
Repeated Measures ANOVA
‘Usual’ ANOVA: Limitation
So far, we only allowed each subject to contribute with one score (one measurement) on the DV:
“Different subjects contribute to different means.”
What if each subject is measured in ALL levels of the treatment factor?
>> Repeated measures (M)ANOVA
- Generalization of paired sample t-test to more than 2 groups.
Imagine the following situations:
Situation 1. A group of subjects is measured under various treatment conditions (or at different
points in time).
Situation 2. Subjects are grouped according to their gender and measured under various
treatment conditions (or at different points in time).
Voordelen van het kopen van samenvattingen bij Stuvia op een rij:
Verzekerd van kwaliteit door reviews
Stuvia-klanten hebben meer dan 700.000 samenvattingen beoordeeld. Zo weet je zeker dat je de beste documenten koopt!
Snel en makkelijk kopen
Je betaalt supersnel en eenmalig met iDeal, creditcard of Stuvia-tegoed voor de samenvatting. Zonder lidmaatschap.
Focus op de essentie
Samenvattingen worden geschreven voor en door anderen. Daarom zijn de samenvattingen altijd betrouwbaar en actueel. Zo kom je snel tot de kern!
Veelgestelde vragen
Wat krijg ik als ik dit document koop?
Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.
Tevredenheidsgarantie: hoe werkt dat?
Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.
Van wie koop ik deze samenvatting?
Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper eefkedej. Stuvia faciliteert de betaling aan de verkoper.
Zit ik meteen vast aan een abonnement?
Nee, je koopt alleen deze samenvatting voor €3,49. Je zit daarna nergens aan vast.