I have created a MLR model where my predictor variables are continuous and categorical. I am interested in the interactions between the categorical variables.
Let's say I have the response variable $y$, and three predictor variables $x_1$, which is continuous and $x_2$ and $x_3$, which are binary, 1 if it is in and 0 if it is not.
Before I create the interaction terms I do mean subtraction to avoid linear dependency. So $$\hat{x_2} = x_2-\text{mean}(x_2)$$ $$\hat{x_3} = x_3 - \text{mean}(x_3)$$
So my linear model is now: $$y = ax_1 + bx_2 + cx_3 +d(\hat{x_2}*\hat{x_3}).$$
My question is about creating a test set of data with the same variables. When creating the test set do I make the interaction term as: $$ x_2 * x_3 $$ without the mean subtraction?
Or do I also use mean subtraction when creating the test data iteraction term as: $$ \hat{x_2}*\hat{x_3} $$