You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In OLS regression, specifying method='qr' and cov_type='HC0' in the fit method results in an error. The error message is:
AttributeError: 'OLS' object has no attribute 'pinv_wexog'
Code Sample, a copy-pastable example if possible
import numpy as np
import statsmodels.api as sm
y = np.random.randn(100)
x = np.random.randn(100, 5)
res = sm.OLS(y, x, missing='drop').fit(method='qr', cov_type='HC0')
If the issue has not been resolved, please file it in the issue tracker.
Expected Output
The above-mentioned error does not occur.
Output of import statsmodels.api as sm; sm.show_versions()
INSTALLED VERSIONS
Python: 3.9.2.final.0
OS: Linux 5.10.0-10-amd64 #1 SMP Debian 5.10.84-1 (2021-12-08) x86_64
byteorder: little
LC_ALL: None
LANG: en_US.utf8
matplotlib: 3.3.4 (/usr/lib/python3/dist-packages/matplotlib)
backend: TkAgg
cvxopt: 1.2.5 (/usr/lib/python3/dist-packages/cvxopt)Note: As you can see, there are many issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates.
Note: Please be sure you are using the latest released version of statsmodels, or a recent build of main. If your problem has been fixed in an unreleased version, you might be able to use main until a new release occurs.
Note: If you are using a released version, have you verified that the bug exists in the main branch of this repository? It helps the limited resources if we know problems exist in the current main branch so that they do not need to check whether the code sample produces a bug in the next release.
Describe the bug
In OLS regression, specifying method='qr' and cov_type='HC0' in the fit method results in an error. The error message is:
AttributeError: 'OLS' object has no attribute 'pinv_wexog'
Code Sample, a copy-pastable example if possible
If the issue has not been resolved, please file it in the issue tracker.
Expected Output
The above-mentioned error does not occur.
Output of
import statsmodels.api as sm; sm.show_versions()
INSTALLED VERSIONS
Python: 3.9.2.final.0
OS: Linux 5.10.0-10-amd64 #1 SMP Debian 5.10.84-1 (2021-12-08) x86_64
byteorder: little
LC_ALL: None
LANG: en_US.utf8
statsmodels
Installed: 0.12.2 (/usr/lib/python3/dist-packages/statsmodels)
Required Dependencies
cython: 0.29.21 (/usr/lib/python3/dist-packages/Cython)
numpy: 1.19.5 (/usr/lib/python3/dist-packages/numpy)
scipy: 1.6.0 (/usr/lib/python3/dist-packages/scipy)
pandas: 1.1.5 (/usr/lib/python3/dist-packages/pandas)
dateutil: 2.8.1 (/usr/lib/python3/dist-packages/dateutil)
patsy: 0.5.1 (/usr/lib/python3/dist-packages/patsy)
Optional Dependencies
matplotlib: 3.3.4 (/usr/lib/python3/dist-packages/matplotlib)
backend: TkAgg
cvxopt: 1.2.5 (/usr/lib/python3/dist-packages/cvxopt)Note: As you can see, there are many issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates.
Note: Please be sure you are using the latest released version of
statsmodels
, or a recent build ofmain
. If your problem has been fixed in an unreleased version, you might be able to usemain
until a new release occurs.Note: If you are using a released version, have you verified that the bug exists in the main branch of this repository? It helps the limited resources if we know problems exist in the current main branch so that they do not need to check whether the code sample produces a bug in the next release.
joblib: 0.17.0 (/usr/lib/python3/dist-packages/joblib)
Developer Tools
IPython: 7.20.0 (/usr/lib/python3/dist-packages/IPython)
jinja2: 2.11.3 (/usr/lib/python3/dist-packages/jinja2)
sphinx: Not installed
pygments: 2.7.1 (/usr/lib/python3/dist-packages/pygments)
pytest: 6.0.2 (/usr/lib/python3/dist-packages/pytest)
virtualenv: 20.4.0+ds (/usr/lib/python3/dist-packages/virtualenv)
The text was updated successfully, but these errors were encountered: