Repository: statsmodels/statsmodels

Issue:
DOC/BUG: update docs for recent changes, sphinx warnings
recent merges for lilliefors and hdrboxplot need doc fixes

```
/home/travis/build/statsmodels/statsmodels/docs/source/stats.rst:49: WARNING: failed to import kstest_normal
/home/travis/build/statsmodels/statsmodels/docs/source/stats.rst:49: WARNING: toctree references unknown document 'generated/kstest_normal'
/home/travis/build/statsmodels/statsmodels/docs/source/stats.rst:150: WARNING: failed to import kstest_normal
/home/travis/build/statsmodels/statsmodels/docs/source/stats.rst:150: WARNING: toctree references unknown document 'generated/kstest_normal'
/home/travis/build/statsmodels/statsmodels/docs/source/index.rst:: WARNING: toctree contains reference to nonexisting document 'generated/kstest_normal'
/home/travis/build/statsmodels/statsmodels/docs/source/index.rst:: WARNING: toctree contains reference to nonexisting document 'generated/kstest_normal'
<autosummary>:: WARNING: toctree contains reference to nonexisting document 'generated/kstest_normal'
<autosummary>:: WARNING: toctree contains reference to nonexisting document 'generated/kstest_normal'
========================================================================
=          Broken Behavior (Errors and Warnings to be Fixed)           =
========================================================================
ERROR: Error occured when running /home/travis/build/statsmodels/statsmodels/examples/notebooks/distributed_estimation.ipynb
WARNING: [autosummary] failed to import 'statsmodels.stats.diagnostic.kstest_normal': no module named statsmodels.stats.diagnostic.kstest_normal
/home/travis/build/statsmodels/statsmodels/statsmodels/graphics/functional.py:docstring of statsmodels.graphics.functional.hdrboxplot:4: WARNING: Inline interpreted text or phrase reference start-string without end-string.
```


Discussion:

Resolving patch:
diff --git a/statsmodels/graphics/functional.py b/statsmodels/graphics/functional.py
--- a/statsmodels/graphics/functional.py
+++ b/statsmodels/graphics/functional.py
@@ -172,12 +172,8 @@ def _min_max_band(args):
 
 def hdrboxplot(data, ncomp=2, alpha=None, threshold=0.95, bw=None,
                xdata=None, labels=None, ax=None):
-    """Plot High Density Region boxplot.
-
-    1. Compute a multivariate kernel density estimation,
-    2. Compute contour lines for quantiles 90%, 50% and `alpha`%,
-    3. Plot the bivariate plot,
-    4. Compute median curve along with quantiles and outliers curves.
+    """
+    High Density Region boxplot
 
     Parameters
     ----------
@@ -192,7 +188,7 @@ def hdrboxplot(data, ncomp=2, alpha=None, threshold=0.95, bw=None,
         smaller of the number of rows or columns in data.
     alpha : list of floats between 0 and 1, optional
         Extra quantile values to compute. Default is None
-    threshold : float between 0 and 1
+    threshold : float between 0 and 1, optional
         Percentile threshold value for outliers detection. High value means
         a lower sensitivity to outliers. Default is `0.95`.
     bw: array_like or str, optional
@@ -230,10 +226,6 @@ def hdrboxplot(data, ncomp=2, alpha=None, threshold=0.95, bw=None,
             [sup, inf] curves.
          - 'outliers', ndarray. Outlier curves.
 
-    See Also
-    --------
-    banddepth, rainbowplot, fboxplot
-
     Notes
     -----
     The median curve is the curve with the highest probability on the reduced
@@ -266,7 +258,14 @@ def hdrboxplot(data, ncomp=2, alpha=None, threshold=0.95, bw=None,
     its contours.
 
     Finally, using these contours, the different quantiles can be extracted
-    allong with the median curve and the outliers.
+    along with the median curve and the outliers.
+
+    Steps to produce the HDR boxplot include:
+
+    1. Compute a multivariate kernel density estimation
+    2. Compute contour lines for quantiles 90%, 50% and `alpha` %
+    3. Plot the bivariate plot
+    4. Compute median curve along with quantiles and outliers curves.
 
     References
     ----------
@@ -303,6 +302,9 @@ def hdrboxplot(data, ncomp=2, alpha=None, threshold=0.95, bw=None,
 
     .. plot:: plots/graphics_functional_hdrboxplot.py
 
+    See Also
+    --------
+    banddepth, rainbowplot, fboxplot
     """
     fig, ax = utils.create_mpl_ax(ax)
 
diff --git a/statsmodels/stats/_lilliefors.py b/statsmodels/stats/_lilliefors.py
--- a/statsmodels/stats/_lilliefors.py
+++ b/statsmodels/stats/_lilliefors.py
@@ -274,7 +274,8 @@ def pval_lf(Dmax, n):
 
 
 def kstest_fit(x, dist='norm', pvalmethod='approx'):
-    '''lilliefors test for normality or an exponential distribution.
+    """
+    Lilliefors test for normality or an exponential distribution.
 
     Kolmogorov Smirnov test with estimated mean and variance
 
@@ -282,9 +283,9 @@ def kstest_fit(x, dist='norm', pvalmethod='approx'):
     ----------
     x : array_like, 1d
         data series, sample
-    dist : string.
-        distribution to test in set {'norm', 'exp'}.
-    pvalmethod : 'approx', 'table'
+    dist : {'norm', 'exp'}, optional
+        Distribution to test in set.
+    pvalmethod : {'approx', 'table'}, optional
         'approx' is only valid for normality. if `dist = 'exp'`,
         `table` is returned.
         'approx' uses the approximation formula of Dalal and Wilkinson,
@@ -318,9 +319,7 @@ def kstest_fit(x, dist='norm', pvalmethod='approx'):
     than with the Anderson-Darling test.
 
     could be vectorized
-
-    '''
-
+    """
     x = np.asarray(x)
     nobs = len(x)
 
diff --git a/statsmodels/stats/diagnostic.py b/statsmodels/stats/diagnostic.py
--- a/statsmodels/stats/diagnostic.py
+++ b/statsmodels/stats/diagnostic.py
@@ -9,5 +9,6 @@
     het_breushpagan, acorr_breush_godfrey  # deprecated because of misspelling
     )
 
-from ._lilliefors import kstest_fit, lilliefors, lillifors # lillifors is deprecated
+from ._lilliefors import (kstest_fit, lilliefors, lillifors, kstest_normal,
+                          kstest_exponential)  # lillifors is deprecated
 from ._adnorm import normal_ad


Test patch: