linearmodels icon indicating copy to clipboard operation
linearmodels copied to clipboard

ENH: Add a formula API call for absorbing regression

Open aeturrell opened this issue 4 years ago • 3 comments

I may have completely missed this (apologies if so), but is there a way to use AbsorbingLS with the formula API?

Thanks for all the hard work—the package is great and I'm using it for notes I've put online here.

aeturrell avatar Nov 23 '21 16:11 aeturrell

It isn't because I need sparse matrices as much as possible for absorbed effects. It should be possible to make a hybrid interface with a formula for the non-absorbed though.

bashtage avatar Nov 25 '21 09:11 bashtage

It is also possible that Formulaic which is not the formula engine supports sparse arrays, which I haven't checked.

bashtage avatar Nov 25 '21 09:11 bashtage

It does indeed support sparse matrices, according to the documentation here.

FYI (simply because it's interesting to see how others have done it-not because it's particularly intuitive), the R package fixest uses the syntax

y ~ x | f

where f is a fixed effect that should be absorbed.

aeturrell avatar Nov 30 '21 15:11 aeturrell