[ANN] Linear Regression v0.7-alpha

I would like to inform you that a new package about linear regression is now available.
I was needing some extra statistics and did eventually coded them for my purpose. I thought this could benefit others as well, so I cleaned up the code. In the end, the result goes in a slightly different route than the official GLM package (more on that in the readme). Let me know if things are useful, not working, or your feedback about the package through Github’s issue, or directly in the comments below.



One of the things that I would like to see in a linear regression package is the possibility to use different robust estimators for the covariance of the parameter estimates depending on possible heteroskedasticity or autocorrelation of the errors (i.e., White or Newey-West standard errors, for example, as are widely used in the econometrics literature. There are many variants.). I have a function that does this, if you might be interested in taking out bits of it: Econometrics/ols.jl at master · mcreel/Econometrics · GitHub


FixedEffectModels uses

and there’s also


Hi @mcreel, thanks for your suggestion.
Do the packages suggested by @nilshg are already sufficient for your needs? or do you prefer to have the features incorporated into a single package?

Hi, @Eric. Yes, those packages offer what I am suggesting. It would be nice if your package could use one or perhaps both of them to offer the user some choices about how to compute standard errors.

Sounds good to me so far.
Would you mind opening an issue on Github about it (that would help me keep track of it)? Ideally, if you could write down how you wish to update the API to include these features, it will be helpful. Also, if you have a test case I could use, that would be great.

GREAT! :+1:

is removing intercept that much difficult?

Hi Eric, I filed an issue.

1 Like

Thank you @mcreel! I tagged it as an enhancement and will look into it in the coming days; I will get back to you through the open issue if I have a question.

Thank you @xinchin!

Well, the formula processing was not trivial enough for me :sweat_smile:. But if you know or could point me to a resource that explains how to do it. I would consider it.
Updating the formula manually is rather straightforward, though (add a +1) and clarifies the model’s intention. Is there a particular use case in which this would be a blocking issue?

I don’t have smallest clue about that :sweat_smile: but your approach was very interesting and I hope you could add more features to your package. BTW those plots in readme are fantastic :+1:

Thank you for your kind words; I would like to let you know that I released a new version that makes it possible to have no intercept. In the same way as GLM, an intercept is implicitly added if the user did not specify an intercept.
If you need some other features, please let me know.

1 Like

@mcreel, I wanted to let you know that I added the features in version 0.71. For now, I did not use the packages mentioned by @nilshg because I could not interface with CovarianceMAtriaces.jl (I raised an issue; however, I am not sure how long it will take to resolve it).
So the HC0, HC1, HC2, and the HAC Newey-West estimators are now available.

1 Like