Skip to content

statsmodels/removed-tsa-arguments

Pack Severity Fix Versions
statsmodels error unsafe, with xpd check --fix --unsafe-fixes statsmodels 0.15+

Statsmodels 0.15 removed old_names from AutoReg and ar_select_order and verbose from grangercausalitytests. These keywords now raise TypeError. Passing literal None as the third positional argument or as nlags in kpss now raises ValueError. Parentheses around None have the same effect.

AutoReg(y, lags=2, old_names=True)
grangercausalitytests(series, maxlag=2, verbose=False)
kpss(y, nlags=None)
AutoReg(y, lags=2)
grangercausalitytests(series, maxlag=2)
kpss(y, nlags="auto")

Remove old_names and update any code that reads legacy parameter labels. Remove verbose and use the returned Granger test dictionary if you need to display results. Replace nlags=None with nlags="auto" to keep the lag selection that statsmodels 0.14 used for None.

Use xpd check --fix --unsafe-fixes for the KPSS edit. It changes a call that raises into one that runs.

Statsmodels 0.15 removals

Statsmodels 0.15 removed old_names from AutoReg and ar_select_order. Drop the keyword and update any code that reads the old parameter labels.

See all rules in the statsmodels pack.