Let's suppose that I have one model with 6 dummy variables for the days of the week and from those in 5 days a specific event happen, suppose that is daytostudy variable and I want to predict how many exercises I can make in each day. At a specific moment in time (recent data) I've began to study also during Saturdays, so all my past behavior changes and the predicted value when I use daytostudy = 1 on Saturdays will have a new behavior.

What is the best way to deal with the change of the behavior of the new variable in a multiple linear regression model? Can you please point me also some references!?


1 Answer 1


"Interactions" allow you to relax the assumption that a variable has a constant relationship to the outcome. You can create an interaction by multiplying two variables (both of which must be included as "main effects" in your model).

For example, say that we wanted to predict age at first marriage (Y) using a sex dummy that equals 1 for males (X1) and another dummy that indicates the respondent has "traditional values" (X2).

Our model equation looks like: Y = B0 + B1*X1 + B2*X2

. . . and our goal is to estimate coefficients B0, B1 and B2.

But then if we hypothesize that although women tend to get married at a younger age than men, this difference is especially pronounced in "traditional families." (In your terms, "the behavior of the variable" changes).

You now want a model equation that looks like:

Y = B0 + B1*X1 + B2*X2 + B3*X1*X2

. . . and our new goal is to estimate coefficients B0, B1, B2, and B3.

Note that B3 will only affect the predicted value of Y if X1 and X2 = 1.

Our model now generates four separate predicted values.

For non-traditional females:

                         Y = B0 +B1*X1 + B2*X2 + B3*X1*X2 
                           = B0 +B1*0  + B2*0  + B3*0*1 
                           = B0

For traditional females:

                     Y = B0 + B1*X1 + B2*X2 + B3*X1*X2
                       = B0 + B1*0  + B2*1  + B3*0*1 
                       = B0 + B2

For non-traditional men:

                     Y = B0 + B1*X1 + B2*X2 + B3*X1*X2 
                       = B0 + B1*1  + B2*0  + B3*1*0 
                       = B0 + B1

For traditional men:

                      Y = B0 + B1*X1 + B2*X2 + B3*X1*X2 
                        = B0 + B1*1 + B2*1 + B3*1*1
                        = B0 + B1 + B2 + B3

B0 is the constant. B1 is the main effect of being male. B2 is the main effect of being traditional. B3 is the additional interaction effect of being a traditional male.

To bring it back to your case, it sounds like you want to interact some kind of time variable (call it "New_Period") with your Saturday variable. This allows for the "Saturday" effect to vary from period to period.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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