Open leostimpfle opened 1 week ago
Yep, very good point. This should also apply to a couple of other methods, i.e. summary()
, etable()
, coefplot()
etc.
The error occurs because fitting a model with fixed effects and an intercept only never actually "fits" the model as there are no "coefficients" to fit and in consequence to display - it's mostly supported to allow users to residualize a variable by fixed effects without having to go down to the demean()
function.
Fitting an intercept only model, e.g.,
"Y ~ 1 | f1 + f2"
will make thetidy
method fail ungracefully because of an error inget_inference
:ValueError: diag requires an array of at least two dimensions
It would be nice to catch the intercept-only case at an earlier stage in
tidy
(or maybeget_inference
?) to avoid throwing hard-to-understand errors inget_inference
.Minimal working example: