StatsModels.jl
StatsModels.jl copied to clipboard
Feature request: support . notation in formula
It would be very useful to write "Y ~ . " to mean "regress on all inputs". Here is a proposed solution: https://stackoverflow.com/questions/44222763/specify-only-target-variable-in-glm-jl But it does not work in StatsModels v0.5 and Julia 1.1.
More generally it would be nice to have a way to regress on all variable satisfying certain conditions (a regex, or dplyr-like conditions like starts_with, contains etc).
@murphyk the SO solution would work if combined with the "constructing formula programatically" section from the docs: https://juliastats.github.io/StatsModels.jl/latest/formula/#Constructing-a-formula-programatically-1 (update: should work on master)
@matthieugomez I think those could be implemented as "special terms", with a few tweaks (currently calls to empty functions error, the schema extraction code would need some changes, etc.)