Repository: statsmodels/statsmodels

Issue:
DOC: slim parameter description not documented in OLS.summary()
#### Describe the bug

Checking the source code for [OLS.summary()](https://www.statsmodels.org/dev/_modules/statsmodels/regression/linear_model.html#OLS) function there's an `slim` which does not appears in the [documentation](https://www.statsmodels.org/dev/generated/statsmodels.regression.linear_model.OLSResults.summary.html). 

When you set `slim=True` one expects not to get the following information in the model summary.

```
diagn_left = [('Omnibus:', ["%#6.3f" % omni]),
                          ('Prob(Omnibus):', ["%#6.3f" % omnipv]),
                          ('Skew:', ["%#6.3f" % skew]),
                          ('Kurtosis:', ["%#6.3f" % kurtosis])
                          ]

diagn_right = [('Durbin-Watson:',
                ["%#8.3f" % durbin_watson(self.wresid)]
                ),
               ('Jarque-Bera (JB):', ["%#8.3f" % jb]),
               ('Prob(JB):', ["%#8.3g" % jbpv]),
               ('Cond. No.', ["%#8.3g" % condno])
               ]
``` 


Discussion:

Resolving patch:
diff --git a/statsmodels/regression/linear_model.py b/statsmodels/regression/linear_model.py
--- a/statsmodels/regression/linear_model.py
+++ b/statsmodels/regression/linear_model.py
@@ -30,11 +30,12 @@
 
 W. Green.  "Econometric Analysis," 5th ed., Pearson, 2003.
 """
-
+from __future__ import annotations
 
 from statsmodels.compat.pandas import Appender
 from statsmodels.compat.python import lrange, lzip
 
+from typing import Sequence
 import warnings
 
 import numpy as np
@@ -47,12 +48,9 @@
 # need import in module instead of lazily to copy `__doc__`
 from statsmodels.regression._prediction import PredictionResults
 from statsmodels.tools.decorators import cache_readonly, cache_writable
-from statsmodels.tools.sm_exceptions import (
-    InvalidTestWarning,
-    ValueWarning,
-    )
+from statsmodels.tools.sm_exceptions import InvalidTestWarning, ValueWarning
 from statsmodels.tools.tools import pinv_extended
-from statsmodels.tools.validation import string_like
+from statsmodels.tools.validation import bool_like, float_like, string_like
 
 from . import _prediction as pred
 
@@ -2642,7 +2640,14 @@ def get_prediction(self, exog=None, transform=True, weights=None,
             self, exog=exog, transform=transform, weights=weights,
             row_labels=row_labels, **kwargs)
 
-    def summary(self, yname=None, xname=None, title=None, alpha=.05, slim=False):
+    def summary(
+            self,
+            yname: str | None = None,
+            xname: Sequence[str] | None = None,
+            title: str | None = None,
+            alpha: float = 0.05,
+            slim: bool = False,
+    ):
         """
         Summarize the Regression Results.
 
@@ -2657,8 +2662,11 @@ def summary(self, yname=None, xname=None, title=None, alpha=.05, slim=False):
         title : str, optional
             Title for the top table. If not None, then this replaces the
             default title.
-        alpha : float
+        alpha : float, optional
             The significance level for the confidence intervals.
+        slim : bool, optional
+            Flag indicating to produce reduced set or diagnostic information.
+            Default is False.
 
         Returns
         -------
@@ -2674,7 +2682,9 @@ def summary(self, yname=None, xname=None, title=None, alpha=.05, slim=False):
             durbin_watson,
             jarque_bera,
             omni_normtest,
-            )
+        )
+        alpha = float_like(alpha, "alpha", optional=False)
+        slim = bool_like(slim, "slim", optional=False, strict=True)
 
         jb, jbpv, skew, kurtosis = jarque_bera(self.wresid)
         omni, omnipv = omni_normtest(self.wresid)
@@ -2724,8 +2734,7 @@ def summary(self, yname=None, xname=None, title=None, alpha=.05, slim=False):
             slimlist = ['Dep. Variable:', 'Model:', 'No. Observations:',
                         'Covariance Type:', 'R-squared:', 'Adj. R-squared:',
                         'F-statistic:', 'Prob (F-statistic):']
-            diagn_left = []
-            diagn_right = []
+            diagn_left = diagn_right = []
             top_left = [elem for elem in top_left if elem[0] in slimlist]
             top_right = [elem for elem in top_right if elem[0] in slimlist]
         else:
@@ -2793,8 +2802,14 @@ def summary(self, yname=None, xname=None, title=None, alpha=.05, slim=False):
 
         return smry
 
-    def summary2(self, yname=None, xname=None, title=None, alpha=.05,
-                 float_format="%.4f"):
+    def summary2(
+            self,
+            yname: str | None = None,
+            xname: Sequence[str] | None = None,
+            title: str | None = None,
+            alpha: float = 0.05,
+            float_format: str = "%.4f",
+    ):
         """
         Experimental summary function to summarize the regression results.
 


Test patch:
diff --git a/statsmodels/regression/tests/test_regression.py b/statsmodels/regression/tests/test_regression.py
--- a/statsmodels/regression/tests/test_regression.py
+++ b/statsmodels/regression/tests/test_regression.py
@@ -1608,3 +1608,15 @@ def test_condition_number(reset_randomstate):
     res = OLS(y, x).fit()
     assert_allclose(res.condition_number, np.sqrt(np.linalg.cond(x.T @ x)))
     assert_allclose(res.condition_number, np.linalg.cond(x))
+
+
+def test_slim_summary(reset_randomstate):
+    y = np.random.standard_normal(100)
+    x = np.random.standard_normal((100, 1))
+    x = x + np.random.standard_normal((100, 5))
+    res = OLS(y, x).fit()
+    summ = res.summary()
+    summ2 = res.summary()
+    slim_summ = res.summary(slim=True)
+    assert str(summ) == str(summ2)
+    assert str(slim_summ) != str(summ)