I am developing a longitudinal econometrics package (unobserved effects models). The package works well as it is, but I would like to better integrate it with the Julia ecosystem. However, I have encountered a few issues and would like to point them out:
For regression models in Julia tends to follow this structure:
StatsBaseworks as a great common framework for the most part.
DataFrames.DataFrameRegressionModelseems a bit redundant when it could be handled at
StatsBase.RegressionModel. The only benefit I can think of would be for predicting with new data as a
DataFrames.DataFrame, but that could be a minor tweak and probably best handled at
GLMis surprisingly rigid in its schemes. I attempted to place my structs as a child of
GLM.LinPredModel, but seems more of a struggle than a benefit.
- Packages such as
CovarianceMatriceshave coded their implementations as an extension of mostly
GLM.LinPredModel. Most of the functions are overly restrictive; for example by calling
getfielddirectly rather than using a common API.
The best alternative would be to use a common API for better development and integration following
StatsBase design. For example, if one needs to get the response variable of a regression model DO NOT use
getfield, rather use
StatsBase.model_response to do so. That way if a new development occurs for any child of
StatsBase.RegressionModel it can be seemly integrated. It also helps with a consistent definition of terms such as
dof_residuals which could be refered as
rdf and in some instances include the intercept or not depending on the preference of the author.