3 ms·
The most important skill in regression is to RECOGNIZE the intercept. It sounds trivial, and is, until you start including interactions between terms. The numbe
by SubiculumCode 2y ago
The most important skill in regression is to RECOGNIZE the intercept. It sounds trivial, and is, until you start including interactions between terms. The number of times I've found a young graduate student screw this up...
Take a simple linear model involving a test score, their age in years (age range 7-16 years), and a binary categorical variable autism diagnosis (0=control,1=autism):
score = age + diagnosis + age:diagnosis
score = (X1)age + (X2)diagnosis + (X3)age:diagnosis.
If the X2 is significant, the naive student would say, "look a group difference!!", not realizing this is the predicted group difference at the intercept, which is when participants were 0 years old. [[
You center age by the mean, or median, or better yet, the age you are most interested in. Once interactions are in the equation, all "lower order" parameter estimates are in reference to the intercept.]]
They might also note a significant effect of age, and then assume it applies to both groups, but the parameter X1 only tells you what the predicted slope is for the reference group (controls), while the interaction tests if the age slopes differ between groups...moreover, even if the interaction isn't significant, the age effect in the autism group might not significantly differ from zero...the data is in the wish washy zone, and you have to be careful in how one interprets the data.
To some here all this will seem obvious, but to many, getting their head firmly into the conditional space of parameters when their are interaction terms takes work. (note: for now I am ignoring other ways of coding groups (grand mean vs one group being the reference) but the lesson still remains. Understand what the intercept means and to whom/what it refers.
- SubiculumCode 2y agoIf I said something stupid above, please let me know. I'm always learning. If you are a strong Bayesian who doesn't like p-values, that is also fine. I get it. I just wanted to provide my observations about a great number of bright students I've worked with who have nevertheless struggled to fluidly interpret models with interaction terms, and point them in the right direction.
- mturmon 2y agoI think this is accurate. A significant loading on diagnosis (X2) does not tell you anything about the effect of diagnosis at any particular age (except age 0). You’d have to recenter the model about the age of interest.
- aquafox 2y agoI always struggle to get a good intuition into models with interaction terms. I usually try to write down for every class of responses which terms of the model go into it and often that helps with interpretation. There's also the ExploreModelMatrix [1] that helps with that task. [1] https://www.bioconductor.org/packages/release/bioc/html/ExploreModelMatrix.html https://www.bioconductor.org/packages/release/bioc/html/Expl...
- wodenokoto 2y ago> but the parameter X1 only tells you what the predicted slope is for the reference group (controls), No, the way you wrote the equation, X1 is for the entire group. You didn’t make a proper dummy variable. X1*age*isControl+X2*isControl+X3*isAutism+X4*isAutism*age+X5*age This way you split out age effects for the two groups from what age effect is the same for both groups