'Interaction terms of the same variable with multiple variables
I have a model
lm = a ~ b
I would like to include c, d , e that represent interactions terms with b =>
lm = a ~ b + b:c + b:d + b:e.
Is there a rapid way to obtain this result without taping each variable? I have more than 10 variables.
Thank you !
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|