def pacf(x, nlags=None, method='ywadjusted', alpha=None): # Handle kwarg deprecation in statsmodels 0.13.0 if "unbiased" in method: warnings.warn( "The `*unbiased` methods have been deprecated in " "statsmodels >= 0.13.0. Please use `*adjusted` instead.", DeprecationWarning) method = method.replace("unbiased", "adjusted") elif method in ("ydu", "ywu", "ldu"): warnings.warn( "The `ydu`, `ywu`, and `ldu` methods have been deprecated in " "statsmodels >= 0.13.0. Please use `yda`, `ywa`, and `lda` " "instead.", DeprecationWarning) method = method.replace("u", "a") return sm_pacf(x=x, nlags=nlags, method=method, alpha=alpha)
def pacf(data, settings): """Process the PACF.""" alpha = settings[LABELS['confint']]['alpha'] data = data['data'] nlags = min(LONG_MAX_LAGS, len(data)-1) try: values, confint = sm_pacf(data, nlags=nlags, alpha=alpha) confint = [list(i) for i in confint] except numpy.linalg.linalg.LinAlgError: values = [] confint = [] return { LABELS['values']: list(values), LABELS['confint']: confint, }
def pacf(x, nlags=40, method='ywunbiased', alpha=None): return sm_pacf(x=x, nlags=nlags, method=method, alpha=alpha)