Questions tagged [interaction]

A situation where the effect of an explanatory variable may depend on the value of another explanatory variable.

"Interaction" refers generally to when the effect of an explanatory variable depends on the value of another explanatory variable. In the simplest case, in linear regression, that is analyzed by including the product between two variables as an additional predictor in the model. This implies that the slope of each variable depends on the value of the variable it is interacting with.

2219 questions
139
votes
9 answers

Obtaining knowledge from a random forest

Random forests are considered to be black boxes, but recently I was thinking what knowledge can be obtained from a random forest? The most obvious thing is the importance of the variables, in the simplest variant it can be done just by calculating…
101
votes
18 answers

Including the interaction but not the main effects in a model

Is it ever valid to include a two-way interaction in a model without including the main effects? What if your hypothesis is only about the interaction, do you still need to include the main effects?
Glen
  • 6,320
  • 4
  • 37
  • 59
72
votes
7 answers

Do all interactions terms need their individual terms in regression model?

I am actually reviewing a manuscript where the authors compare 5-6 logit regression models with AIC. However, some of the models have interaction terms without including the individual covariate terms. Does it ever make sense to do this? For example…
djhocking
  • 1,701
  • 3
  • 17
  • 21
51
votes
3 answers

Different ways to write interaction terms in lm?

I have a question about which is the best way to specify an interaction in a regression model. Consider the following data: d <- structure(list(r = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L),…
Manuel Ramón
  • 2,045
  • 4
  • 15
  • 16
42
votes
6 answers

What are best practices in identifying interaction effects?

Other than literally testing each possible combination of variable(s) in a model (x1:x2 or x1*x2 ... xn-1 * xn). How do you identify if an interaction SHOULD or COULD exist between your independent (hopefully) variables? What are best practices in…
Brandon Bertelsen
  • 6,672
  • 9
  • 35
  • 46
41
votes
1 answer

Intuition behind tensor product interactions in GAMs (MGCV package in R)

Generalized additive models are those where $$ y = \alpha + f_1(x_1) + f_2(x_2) + e_i $$ for example. the functions are smooth, and to be estimated. Usually by penalized splines. MGCV is a package in R that does so, and the author (Simon Wood)…
generic_user
  • 11,981
  • 8
  • 40
  • 63
34
votes
3 answers

Why could centering independent variables change the main effects with moderation?

I have a question related to multiple regression and interaction, inspired by this CV thread: Interaction term using centered variables hierarchical regression analysis? What variables should we center? When checking for a moderation effect I do…
Marc Schubert
  • 341
  • 1
  • 4
  • 3
30
votes
1 answer

Is interaction possible between two continuous variables?

All of my variables are continuous. There are no levels. Is it possible to even have interaction between the variables?
TheCloudlessSky
  • 749
  • 3
  • 8
  • 12
28
votes
3 answers

Interpreting interaction terms in logit regression with categorical variables

I have data from a survey experiment in which respondents were randomly assigned to one of four groups: > summary(df$Group) Control Treatment1 Treatment2 Treatment3 59 63 62 66…
Pygmalion
  • 455
  • 1
  • 6
  • 9
27
votes
1 answer

What is the non-parametric equivalent of a two-way ANOVA that can include interactions?

Hi I am trying to find the non-parametric equivalent of a two-way ANOVA (3x4 design) which is capable of including interactions. From my reading in Zar 1984 "Biostatistical analysis" this is possible using a method put forth in Scheirer, Ray, and…
user35595
  • 271
  • 1
  • 3
  • 4
27
votes
4 answers

What if interaction wipes out my direct effects in regression?

In a regression, the interaction term wipes out both related direct effects. Do I drop the interaction or report the outcome? The interaction was not part of the original hypothesis.
Jen
  • 273
  • 1
  • 4
  • 4
25
votes
3 answers

How to interpret main effects when the interaction effect is not significant?

I ran a Generalized Linear Mixed Model in R and included an interaction effect between two predictors. The interaction was not significant, but the main effects (the two predictors) both were. Now many textbook examples tell me that if there is a…
24
votes
3 answers

Understanding Simpson's paradox: Andrew Gelman's example with regressing income on sex and height

Andrew Gelman in one of his recent blog posts says: I do not think counterfactuals or potential outcomes are necessary for Simpson’s paradox. I say this because one can set up Simpson’s paradox with variables that cannot be manipulated, or for…
Abhimanyu Arora
  • 361
  • 1
  • 8
24
votes
3 answers

Representing interaction effects in directed acyclic graphs

Directed acyclic graphs (DAGs; e.g., Greenland, et al, 1999) are a part of a formalism of causal inference from the counterfactual interpretation of causality camp. In these graphs the presence of an arrow from variable $A$ to variable $B$ asserts…
Alexis
  • 26,219
  • 5
  • 78
  • 131
23
votes
5 answers

What is a block in experimental design?

I have two questions about the notion of block in experimental design : (1) What is the difference between a block and a factor ? (2) I tried to read some books but something is not clear: it seems that the authors always assume that there is no…
Stéphane Laurent
  • 17,425
  • 5
  • 59
  • 101
1
2 3
99 100