Week 9 - linear models: multiple factors Flashcards
are factors categorical or numerical?
either or both
what are we testing?
analyses replicate values of Y for all combinations of groups in two or more factors (categorical Xs)
Might have three null hypotheses - main effects (two hypotheses) and the third is the interaction
linear models shapes and interactions
if lines are parallel, then each factor’s effect on Y is the same across groups in the other factor (i.e., factors don’t interact)
if lines aren’t parallel, then each factor’s effect on Y differs across groups in the other factor (i.e., factors interact)
Interaction with A and B (cross): but they can make tests of main effects invalid… so we must always consider the validity of main effects if factors interact
Tests of main effects may not be invalid but we need to think about it
fixed factor
different categories of a fixed factor are predetermined of direct interest and repeatable.
random factor
a variable whose groups are not predetermined but instead are randomly sampled from a population of groups.
adjusting for the effects of a covariate
ANCOVA
Investigate if linear regression fitted to data from multiple groups have the same slope.
testing interaction
A linear model with one numerical and one categorical explanatory variable fits seperate regression lines to each group of the categorical variable
A test of the interaction term between the two variables is a test of whether the slopes of the regression lines is the same for all groups of the categorical variable (focuses on interaction)
or to adjust the factor’s effect on Y to account for the numerical variable (assumes no interaction)
Three null hypotheses
fitting a model without an interaction term
If we can assume that there is no difference between the regression slopes then we can fit a model without an interaction term
Do this with great caution