0
$\begingroup$

I have a question regarding the analysis/interpretation of a significant interaction between a continuous variable and a categorical variable, which seems pretty easy but I just don't understand it completely.

This is my main model: modelExp2 <- lm(Prosociality ~ fCondition + Neuroticism + Extraversion + Openness + Agreeableness + Conscientiousness + fCondition:Neuroticism + fCondition:Extraversion + fCondition:Openness + fCondition:Agreeableness + fCondition:Conscientiousness, data=DataExp2)

I found that the interaction fCondition:Neuroticism and the interaction fCondition:Extraversion are significant. fCondition is the condition, with 2 levels (imitation or no-imitation). Neuroticism and Extraversion are both continuous predictors. In order to analyse these effects further my teacher suggested to plot these effects, but I assume that I also need to know the significance of this? That is, in my report I should also write down the significance of Neuroticism on the dependent variable for each of the two levels of Condition, right? How can I do this? The plot gives me an idea about the direction of the effect per level, but it does not tell me anything about the significance of this per level.

$\endgroup$
1
$\begingroup$

Don't be fooled by the fact that summary() gives you p-values. You can't say that "an interaction is significant." You need to calculate marginal effects. So, you can say something like, "this continuous variable was significant for some category" or "this category was significant over some range of this continuous variable."

Let's work a simple example. We have the model: $$ outcome = \alpha +b_1age+b_2gender + b_3age*gender + \epsilon $$

The marginal effect of $age$ (continuous) on $outcome$ (continuous) is the partial derivative of $outcome$ with respect to $age$:

$$ \frac{\partial outcome}{\partial age} = b_1 + b_3*gender $$

So, the effect of $age$ depends on the category of $gender$, which for a variable with only two categories, as in your example, is not too complicated (you're multiplying $b_3$ by either 0 or 1).

In R, try the 'effects' package if you have not already:

library(effects)
allEffects(mod)
plot(allEffects(mod))

Also -- with so many interactions, make sure that your model is not over-specified. I don't know how large your sample is, but I'd imagine that it would need to be quite large.

$\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.