Open Nosferican opened 5 years ago
GLM was probably used as easiest way to get linear regression working. What would be a way to through
StatsBase.StatisticalModel / StatsBase.RegressionModel API? Is there something beyond type definitions at src/statmodels.jl that should be taken to consideration? A link to any other example implementation would be great.
It should probably just be replacing the use of internals for accessors. For example,
Any time you have mod.pp.X
you would call modelmatrix(mod)
or for mod.rr.y
, response(y)
.
if you need weighs, weights(model)
, etc. I think that should be the core of it. If it helps to have additional methods (e.g., hasintercept
) we can add those the the API.
This is something we definitely should take in into consideration when expanding anova()
beyond simple linear models.
I encourage the implementation to be based solely on the
StatsBase.StatisticalModel
/StatsBase.RegressionModel
API such that it works with any regression model rather than limiting it to only the GLM struct. As for the GLM, I believe it wasn't robust toallowrankdeficient
which could benefit from the generalization and checks. If you need methods beyond the current API, do reach out and we can expand the API to accommodate it.