-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plot_pacf
default lags
raises with a small sample
#9015
Milestone
Comments
bashtage
added a commit
to bashtage/statsmodels
that referenced
this issue
Oct 2, 2023
Reduce default lag size when sample is small closes statsmodels#9015
bashtage
added a commit
to bashtage/statsmodels
that referenced
this issue
Dec 6, 2023
Reduce default lag size when sample is small closes statsmodels#9015
bashtage
added a commit
to bashtage/statsmodels
that referenced
this issue
Dec 8, 2023
Reduce default lag size when sample is small closes statsmodels#9015
bashtage
added a commit
to bashtage/statsmodels
that referenced
this issue
Dec 11, 2023
Reduce default lag size when sample is small closes statsmodels#9015
bashtage
added a commit
to bashtage/statsmodels
that referenced
this issue
Dec 12, 2023
Reduce default lag size when sample is small closes statsmodels#9015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When the parameter
lags
is not specified instatsmodels.graphics.tsaplots.plot_pacf
, the value which is computed by default causes the function to raise aValueError
due tonlags
being more than 50% of the sample size.The limitation of 50% of the sample size should be applied when computing default
nlags
.Code Sample, a copy-pastable example if possible
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.
If the issue has not been resolved, please file it in the issue tracker.
Expected Output
The limitation of 50% of the sample size should be applied when computing default
nlags
.See for example datamole-ai/edvart#154 for a workaround.
Output of
import statsmodels.api as sm; sm.show_versions()
INSTALLED VERSIONS
Python: 3.11.3.final.0
OS: Linux 6.5.3-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Sep 13 12:21:35 UTC 2023 x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
statsmodels
Installed: 0.14.0 /tmp/venv/lib/python3.11/site-packages/statsmodels)
Required Dependencies
cython: Not installed
numpy: 1.24.4 (/tmp/venv/lib/python3.11/site-packages/numpy)
scipy: 1.10.1 (/tmp/venv/lib/python3.11/site-packages/scipy)
pandas: 1.5.3 (/tmp/venv/lib/python3.11/site-packages/pandas)
dateutil: 2.8.2 (/tmp/venv/lib/python3.11/site-packages/dateutil)
patsy: 0.5.3 (/tmp/venv/lib/python3.11/site-packages/patsy)
Optional Dependencies
matplotlib: 3.7.3 (/tmp/venv/lib/python3.11/site-packages/matplotlib)
backend: module://matplotlib_inline.backend_inline
cvxopt: Not installed
joblib: 1.3.2 (/tmp/venv/lib/python3.11/site-packages/joblib)
Developer Tools
IPython: 8.12.2 (/tmp/venv/lib/python3.11/site-packages/IPython)
jinja2: 3.1.2 (/tmp/venv/lib/python3.11/site-packages/jinja2)
sphinx: 7.1.2 (/tmp/venv/lib/python3.11/site-packages/sphinx)
pygments: 2.16.1 (/tmp/venv/lib/python3.11/site-packages/pygments)
pytest: 7.1.3 (/tmp/venv/lib/python3.11/site-packages/pytest)
virtualenv: Not installed
The text was updated successfully, but these errors were encountered: