Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
IndexError
when no lags given in command
Previously, if no lags of the dependent variable were included, you would get an `IndexError` on line 313, as it would be the case that `dep_lags = [0]`, which makes `len(dep_lags) == 1`, so it would be impossible to index `dep_lags[1]`. That is, if no lags are included, `len(dep_lags) == 1`. Line 309 has been updated to reflect this fact. Additionally, line 305 could theoretically give an IndexError now, as there is no check that `len(dep_lags) > 0`. This check was added as well. With those two checks, the check for `len(dep_lags) > 0` on line 313 is no longer necessary, as the first two checks guarantee `len(dep_lags) > 1`.
- Loading branch information