# Can interactions be included in hierarchical partitioning?

I am analysing data by means of multiple regression. My goal is to find out about the relative importance of the independent variables, using hierarchical partitioning (package hier.part in R). However, I assume that the interaction of some of the independent variables is important, too. Now I am wondering if it is valid to have interactions when doing hierarchical partitioning? I could not find anything in the literature (Mac Nally (2002) - Multiple regression and inference in ecology and conservation biology: further comments on identifying important predictor variables, Chevan & Sutherland (1991) - Hierarchical Partioning)

My model would look something like this: DV ~ IV1 + IV2 + IV1:IV2 + IV3 + IV4 + IV5

Result of hierarchical partioning with interaction:

           I
IV1       20.8255247
IV2        4.3218387
IV1:IV2   70.7574155
IV3        1.6795456
IV4        0.8780111
IV5        1.5376644


Result of hierarchical partioning without interaction:

           I
IV1       74.132474
IV2       14.690646
IV3        6.872467
IV4        1.311382
IV5        2.993031


It appears that interactions always have (much) greater values than their IVs have seperately. So is that a "true" effect and a sign to include the interaction in the model or should this be treated with caution?

• There is no reason for it to be invalid, but why do you want it? Hierarchical partioning ("tree methods") are often seen as a way of automatic interaction detection. The "variable importance" values you give us is'nt of fundamental importance, how do this to models compare on crossvalidation? Nov 30, 2016 at 8:36
• @kjetilbhalvorsen I can't answer your question as I have no idea, but to explain my objective: Given a model DV ~ IV1 + IV2 + IV1:IV2 I get an R2 of 0.6, now I'd like to know the relative contribution of the IVs to the variance explained by the model, based on hierarchical partioning. But would it be valid to only use the single IVs without interaction (as this would be different from the model specification).
– user45065
Nov 30, 2016 at 8:40
• Why do you only include the IV1:IV2 interaction? And, are the IVs mutually dependent? Dec 18, 2016 at 10:06
• @smndpln No, the IVs are not mutually dependent, I am trying to figure out if there are important interactions or not, based on knowledge/plausible assumptions, so IV1:IV2 interaction is a possibility, there could be more/other interactions, my aim is to create an explanatory model, not a predictive model
– user45065
Dec 18, 2016 at 16:05

There are actually no problems with interactions: you can estimate their contribution, like you are doing for the IVs. See also https://www.researchgate.net/post/Is_hierarchical_partitioning_possible_in_general_linear_mixed_models_with_interaction_terms

However, I assume that the interaction of some of the independent variables is important, too.

Knowing your data better would help understanding the situation. However, my concern is about the inclusion of only a-priori selected interactions (IV1:IV2 in your example). There should be strong assumptions for that. Otherwise, it is usually more sensed to include all the first level interactions in the regression, trying to answer the more general question "Is a given explanatory variable per se, or its interaction with another variable, important in my model?".

Hope this helps.

As far as I know HP was created for additive models so I think there is very little sense to analyze joint and individual contribution of each explanatory variable when they actually interact between each other. Moreover, I am not sure if there are any procedures to cope with random factors in mixed models.

HP method is being used for linear models to split R2 into (1) joint effect of an explanatory variable of interest with other variables and (2) individual contribution of the variable of interest. This method assume additive effects of explanatory variables so I am not sure how to cope with interaction terms.

Well, the function 'importance' from MuMIN package to calculate the relative importance of each variable, that works using the sum of ‘Akaike weights’ over all models including the explanatory variable.

Hope I have tried to answer your Question.one needs to look at purpose of prediction and data that is used too.