Repository: statsmodels/statsmodels

Issue:
Lingering print statement
#### Describe the bug

Not really a bug, but there is currently a rouge print statement inside the `main` branch of `statsmodels.tsa.ar_model.AutoReg`. The print statement is here https://github.com/statsmodels/statsmodels/blob/main/statsmodels/tsa/ar_model.py#L318. I'm happy to open a PR to fix this, but that maybe feels overkill just to delete this one line.

#### Output of ``import statsmodels.api as sm; sm.show_versions()``

<details>

INSTALLED VERSIONS
------------------
Python: 3.10.4.final.0
OS: Linux 4.18.0-372.13.1.el8.nci.x86_64 #1 SMP Mon Jul 4 08:46:44 AEST 2022 x86_64
byteorder: little
LC_ALL: None
LANG: None

statsmodels
===========

Installed: 0.14.0.dev485+g7182400ef

Required Dependencies
=====================

cython: Not installed
numpy: 1.21.6
scipy: 1.8.1
pandas: 1.4.2
    dateutil: 2.8.2
patsy: 0.5.2

Optional Dependencies
=====================

matplotlib: 3.5.2
    backend: module://matplotlib_inline.backend_inline 
cvxopt: Not installed
joblib: 1.1.0

Developer Tools
================

IPython: 8.3.0
    jinja2: 3.1.2
sphinx: Not installed
    pygments: 2.12.0
pytest: 7.1.2
virtualenv: Not installed

</details>



Discussion:

Resolving patch:
diff --git a/statsmodels/stats/_adnorm.py b/statsmodels/stats/_adnorm.py
--- a/statsmodels/stats/_adnorm.py
+++ b/statsmodels/stats/_adnorm.py
@@ -46,12 +46,9 @@ def anderson_statistic(x, dist='norm', fit=True, params=(), axis=0):
             s = np.expand_dims(np.std(x, ddof=1, axis=axis), axis)
             w = (y - xbar) / s
             z = stats.norm.cdf(w)
-            # print z
         elif callable(dist):
             params = dist.fit(x)
-            # print params
             z = dist.cdf(y, *params)
-            print(z)
         else:
             raise ValueError("dist must be 'norm' or a Callable")
     else:
diff --git a/statsmodels/tsa/ar_model.py b/statsmodels/tsa/ar_model.py
--- a/statsmodels/tsa/ar_model.py
+++ b/statsmodels/tsa/ar_model.py
@@ -315,7 +315,6 @@ def _check_lags(
                 assert isinstance(val, int)
                 _lags.append(val)
             _lags_arr: NDArray = np.array(sorted(_lags))
-            print(_lags_arr)
             if (
                 np.any(_lags_arr < 1)
                 or np.unique(_lags_arr).shape[0] != _lags_arr.shape[0]


Test patch:
diff --git a/statsmodels/discrete/tests/test_predict.py b/statsmodels/discrete/tests/test_predict.py
--- a/statsmodels/discrete/tests/test_predict.py
+++ b/statsmodels/discrete/tests/test_predict.py
@@ -355,7 +355,6 @@ def test_distr(case):
     if issubclass(cls_model, BinaryModel):
         y = (y > 0.5).astype(float)
 
-    print("\n\n", cls_model, kwds)
     mod = cls_model(y, x, **kwds)
     # res = mod.fit()
     params_dgp = params
diff --git a/statsmodels/tests/test_x13.py b/statsmodels/tests/test_x13.py
--- a/statsmodels/tests/test_x13.py
+++ b/statsmodels/tests/test_x13.py
@@ -1,8 +1,10 @@
 import pandas as pd
+
 from statsmodels.tsa.x13 import _make_var_names
 
 
 def test_make_var_names():
-    # Check that _make_var_names return the corrent name when exog is pandas Series
-    exog = pd.Series([1,2,3], name='abc')
+    # Check that _make_var_names return the current name when exog is
+    # a pandas Series
+    exog = pd.Series([1, 2, 3], name="abc")
     assert _make_var_names(exog) == exog.name