Repository navigation
BUG: Set default lags for acf/pacf plots - #4949
Conversation
|
Log is a sensible choice since it is probably maximum rate with which standard confidence regions are plausible. |
|
closes #4748 |
4934db8 to
75725cd
Compare
| acf_x = acf_x[1:] | ||
| lags = lags.astype(np.float) | ||
| lags[0] -= 0.5 | ||
| lags[-1] += 0.5 |
There was a problem hiding this comment.
what's the reason for this?
Doesn't this keep the fill_between too far away from the plot left and right edges?
| # GH 4663 - use a sensible default value | ||
| nobs = x.shape[0] | ||
| lim = min(int(np.ceil(10 * np.log10(nobs))), nobs-1) | ||
| lim = lim if lim <= nobs - 1 else nobs - 1 |
There was a problem hiding this comment.
isn't this redundant with the previous line?
pep-8 missing spaces in nobs-1 on previous line
There was a problem hiding this comment.
still open question, I don't see what line 18 is supposed to do
|
LGTM, I don't have any clear opinion about the default, so following R is sensible. |
75725cd to
2e9b4cd
Compare
2e9b4cd to
14e41f0
Compare
Codecov Report
@@ Coverage Diff @@
## master #4949 +/- ##
==========================================
+ Coverage 81.42% 81.42% +<.01%
==========================================
Files 581 581
Lines 90271 90273 +2
Branches 10099 10099
==========================================
+ Hits 73506 73508 +2
Misses 14479 14479
Partials 2286 2286
Continue to review full report at Codecov.
|
14e41f0 to
30f2e86
Compare
30f2e86 to
184d58e
Compare
Set a sensible default value for acf and pacf plot lags when not provided using a method common to R based on the log of the number of observations. Makes a small aesthetic change that ensures points are inside the shaded confint Small pep8 clean up closes statsmodels#4663 closes statsmodels#4748
184d58e to
47e410f
Compare
|
all green, merging @bashtage Thank you |

Set a sensible default value for acf and pacf plot lags when not provided
using a method common to R based on the log of the number of observations.
closes #4663