StatsModels.jl icon indicating copy to clipboard operation
StatsModels.jl copied to clipboard

Operations for Terms

Open jtrakk opened this issue 4 years ago • 3 comments

Term(:a) * Term(:b) and most of the @formula operators are currently not supported. It would be useful to have those for constructing formulas programmatically.

jtrakk avatar Sep 20 '21 23:09 jtrakk

Which of the other operators are not supported? ~, +, and & should all more or less work at run time. If they don't then that's a bug but there are tests for them.

* is a bit of a special case; it's currently handled at parse time and no run-time methods are defined for it. That might change in a future version though, but that syntax has been...controversial...so it migth be handled via the normal FunctionTerm overloading for regression models, perhaps in a package like https://github.com/kleinschmidt/RegressionFormulae.jl (which is very much WIP)

kleinschmidt avatar Oct 15 '21 17:10 kleinschmidt

Also #183 moves a lot more of the logic that current happens at parse time to run-time so that may be worth checking out.

kleinschmidt avatar Oct 15 '21 17:10 kleinschmidt

Which of the other operators are not supported? ~, +, and & should all more or less work at run time. If they don't then that's a bug but there are tests for them.

You're right, I'm not sure why I said that.

jtrakk avatar Oct 15 '21 17:10 jtrakk