I want to construct a regression formula for a general quadratic model without writing out each interaction term separately. I remember that for the python Statsmodels package I could do something like:
In julia, I thought the analogon could look like
@formula(y ~ a^2+b^2+c^2 +(a+b+c)^2) .
Here, however, the last term is interpreted as a single parameter and not as
@formula(y ~ a^2+b^2+c^2 + a*b+b*c+a*c)
Is there an easy way to account for all combinatorial interactions?
(for 3 parameters the difference is obviously no big deal, but I’m looking for a solution for an arbitrary number of parameters)