REF/BUG/Design: GLM versus OLS get_prediction in near-singular corner case
partially related to #4001 and #2628 and checking get_prediction
I used a near-singular example, just below the "singular" rcond cutoff for investigating #4001 see also #3994 changes in default rcond in numpy (for lstsq)
When I use the same example for prediction, then I get numbers in GLM, but not when I run the same examle as OLS. In OLS get_prediction the mean var is negative and mean_se is nan.
This is just another edge case as in #2628 with almost singular design but where regularization does not kick in yet. However, I don't see where the difference between GLM Gaussian and OLS comes from. GLM Gaussian is (supposed to be) using WLS with pinv which should be the same as OLS with pinv, except WLS is run twice, I guess, in GLM (or more precisely one np.linalg.lstsq followed by one WLS with pinv).
Source: statsmodels/statsmodels