Statistics for CSAI 2
by Albert Major
- New integrated teaching platform
- Lecturer introduced the “seamless app”, an interface that combines lecture slides, quizzes, and R coding blocks.
- You can run R code directly in the browser, without loading data manually.
- It mirrors lecture content, but students are free to ignore it.
- Feedback is welcome.
- Today’s topic: categorical predictors in multiple regression
- You already learned multiple regression with continuous variables.
- You also learned dummy coding with two categories.
- Today expands this to three or more categories.
- You learn four systems:
- Dummy coding
- Unweighted effects coding
- Weighted effects coding
- Contrast coding
- All systems convert groups into numeric variables.
- You always need G − 1 coded variables for G groups.
-
Quick quiz session (interpreting R output)
3.1 Interaction question recap
- R output had two main effects and one interaction effect.
- Interaction term was negative and significant.
- Interpretation:
- The effect of engagement on grades becomes weaker as class size increases.
- Because the interaction coefficient is negative.
3.2 How to understand an interaction