Other functions for modeling and comparing groups
We have seen that lm() can be used to compare groups of data that:
- are independent
- have normally distributed residuals
- divided over groups with equal spreads
Obviously when your data is not normal or dependent you have to use another function than lm().
How to choose the correct function for modeling or comparing groups?
For those who don’t know logistic regression check out the video below:
What if your data is dependent?
In that case, there are random effects in your data (the factor that defines the dependency) on top of the fixed effects that you want to compare (the factor(s) that define(s) the groups to compare). As a result the models you use for these comparisons are called linear mixed (fixed and random effects) models.
We have a separate two-day course to cover these kinds of models. Please register to this course if you need to analyze dependent data. Don’t hesitate to ask us to organize the course if it’s not planned on the training website. Below you can find the slides and the tutorial of this course.