0
$\begingroup$

I've run a glm (gaussian family) with a*b as independent variables. At first, I run two separate models (like glm(y~a) and glm(y~b)), in which the a was not significant and the b it was. Then, I combined them together in glm(y~a*b). Combining them, I have both the independent variables significant, even if a less significant than b. How is it possible? Can have anything to do with the intercept? Shall I try to remove the intercept from the interaction model?

I attached the scripts of the model with just a (ci$TOT), the model with just b (ci$salinity), the model with interaction and the same model with interaction but without intercept.

enter image description here

$\endgroup$
0
$\begingroup$

You could have a situation roughly like this:

Scatterplot with marginal histograms for fake data

I make up a rather trite fictional $x$ and $y$. There is also a factor variable in play (I hope red and blue circles are OK). If you look at the margins of this plot, it might be difficult to distinguish the two groups of $x$ or of $y$. Maybe $y$ just looks (to an hypothesis test) like a univariate sample, however, when you consider both $x$ and the factor variable (coloured dots) together in a model, it's very clear that you have two intercepts (as it happens I gave them both the same slope).

If you have an interaction, you also have one slope slightly steeper than the other. But because of confounding you don't get that reported in your single variable regressions.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.