Hello everyone,

I’m very new to R and statistics in general and have some questions regarding linear regression models with multiple predictors.

If I have a dataset containing 4 predictor variables (of which 2 are binary (dummy coded) variables and the other two are continuous, as well as a continuous dependent variable, and I want to know how they all interact with each other as well as influence my DV, how would I do that?

I have already established that there is an interaction between one continuous and one dummy variable (which however aren’t good individual predictors for the outcome).

Can I do a model of the following form (is this mathematically possible) and if yes, how do I interpret the coefficients? Are the other variables that aren’t part of the interaction also influenced by the terms within the interaction and need to be interpreted in light of the interaction?

Y= b0 + b1X1 + b2D1 + b3X2 + b4D2 + b5(X2*D2)

Thank you!