Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This changes the implementation of the default priors so that they are based entirely on the log-likelihood function, never referencing the multiple regressions of Y and X on the covariates as in the previous implementation. For Normal response models, the results are essentially the same as before, but not exactly, as the new implementation relies on a quadratic approximation to the log-likelihood function (which is close but not perfect). Non-normal response models are now handled exactly the same as Normal response models now. However, the quadratic approximation to the log-likelihood is not as good for non-Normal response models, so the interpretation of the priors in terms of the standard deviation of the implied partial correlation should be considered a fairly rough approximation. Nevertheless, the default priors for non-Normal models are now much more intuitively sensible than before. This same implementation should also work almost entirely "as-is" for other link functions / response distributions that we have not explicitly implemented; all we really need to do is point to the appropriate statsmodels distribution family in priors.py.
We might be able to upgrade the quadratic approximation to a quartic approximation, which should give even better results. But I have not worked this out yet. In any case, for now this is ready for production.