prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  API/DOCS: newer correlation tools are missing in api and docs
  `stats.api` and http://www.statsmodels.org/dev/stats.html#moment-helpers
  only shows the original functions, not those added by Kerby
  
  (I'm trying to figure out where we should put new correlation and covariance function, hypothesis tests, robust, regularized covariance and correlation.)
  
  
  </issue>
  <code>
  [start of statsmodels/stats/api.py]
  1 # pylint: disable=W0611
  2 from . import diagnostic
  3 from .diagnostic import (
  4             acorr_ljungbox, acorr_breusch_godfrey,
  5             CompareCox, compare_cox, CompareJ, compare_j,
  6             HetGoldfeldQuandt, het_goldfeldquandt,
  7             het_breuschpagan, het_white, het_arch,
  8             linear_harvey_collier, linear_rainbow, linear_lm,
  9             breaks_cusumolsresid, breaks_hansen, recursive_olsresiduals,
  10             unitroot_adf,
  11             normal_ad, lilliefors,
  12              # deprecated because of misspelling:
  13             lillifors, het_breushpagan, acorr_breush_godfrey
  14             )
  15 
  16 from . import multicomp
  17 from .multitest import (multipletests, fdrcorrection, fdrcorrection_twostage)
  18 from .multicomp import tukeyhsd
  19 from . import gof
  20 from .gof import (powerdiscrepancy, gof_chisquare_discrete,
  21                   chisquare_effectsize)
  22 from . import stattools
  23 from .stattools import durbin_watson, omni_normtest, jarque_bera
  24 
  25 from . import sandwich_covariance
  26 from .sandwich_covariance import (
  27             cov_cluster, cov_cluster_2groups, cov_nw_panel,
  28             cov_hac, cov_white_simple,
  29             cov_hc0, cov_hc1, cov_hc2, cov_hc3,
  30             se_cov
  31             )
  32 
  33 from .weightstats import (DescrStatsW, CompareMeans, ttest_ind, ttost_ind,
  34                          ttost_paired, ztest, ztost, zconfint)
  35 
  36 from .proportion import (binom_test_reject_interval, binom_test,
  37             binom_tost, binom_tost_reject_interval,
  38             power_binom_tost, power_ztost_prop,
  39             proportion_confint, proportion_effectsize,
  40             proportions_chisquare, proportions_chisquare_allpairs,
  41             proportions_chisquare_pairscontrol, proportions_ztest,
  42             proportions_ztost)
  43 
  44 from .power import (TTestPower, TTestIndPower, GofChisquarePower,
  45                     NormalIndPower, FTestAnovaPower, FTestPower,
  46                     tt_solve_power, tt_ind_solve_power, zt_ind_solve_power)
  47 
  48 from .descriptivestats import Describe
  49 
  50 from .anova import anova_lm
  51 
  52 from . import moment_helpers
  53 from .correlation_tools import corr_nearest, corr_clipped, cov_nearest
  54 
  55 from statsmodels.sandbox.stats.runs import (Runs, runstest_1samp, runstest_2samp)
  56 
  57 from statsmodels.stats.contingency_tables import (mcnemar, cochrans_q,
  58                                                   SquareTable,
  59                                                   Table2x2,
  60                                                   Table,
  61                                                   StratifiedTable)
  62
  [end of statsmodels/stats/api.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/statsmodels/stats/api.py b/statsmodels/stats/api.py
  --- a/statsmodels/stats/api.py
  +++ b/statsmodels/stats/api.py
  @@ -39,7 +39,7 @@
               proportion_confint, proportion_effectsize,
               proportions_chisquare, proportions_chisquare_allpairs,
               proportions_chisquare_pairscontrol, proportions_ztest,
  -            proportions_ztost)
  +            proportions_ztost, multinomial_proportions_confint)
   
   from .power import (TTestPower, TTestIndPower, GofChisquarePower,
                       NormalIndPower, FTestAnovaPower, FTestPower,
  @@ -50,7 +50,9 @@
   from .anova import anova_lm
   
   from . import moment_helpers
  -from .correlation_tools import corr_nearest, corr_clipped, cov_nearest
  +from .correlation_tools import (corr_clipped, corr_nearest,
  +            corr_nearest_factor, corr_thresholded, cov_nearest,
  +            cov_nearest_factor_homog, FactoredPSDMatrix)
   
   from statsmodels.sandbox.stats.runs import (Runs, runstest_1samp, runstest_2samp)
  
verification_info: {"golden_diff": "diff --git a/statsmodels/stats/api.py b/statsmodels/stats/api.py\n--- a/statsmodels/stats/api.py\n+++ b/statsmodels/stats/api.py\n@@ -39,7 +39,7 @@\n             proportion_confint, proportion_effectsize,\n             proportions_chisquare, proportions_chisquare_allpairs,\n             proportions_chisquare_pairscontrol, proportions_ztest,\n-            proportions_ztost)\n+            proportions_ztost, multinomial_proportions_confint)\n \n from .power import (TTestPower, TTestIndPower, GofChisquarePower,\n                     NormalIndPower, FTestAnovaPower, FTestPower,\n@@ -50,7 +50,9 @@\n from .anova import anova_lm\n \n from . import moment_helpers\n-from .correlation_tools import corr_nearest, corr_clipped, cov_nearest\n+from .correlation_tools import (corr_clipped, corr_nearest,\n+            corr_nearest_factor, corr_thresholded, cov_nearest,\n+            cov_nearest_factor_homog, FactoredPSDMatrix)\n \n from statsmodels.sandbox.stats.runs import (Runs, runstest_1samp, runstest_2samp)\n", "issue": "API/DOCS: newer correlation tools are missing in api and docs\n`stats.api` and http://www.statsmodels.org/dev/stats.html#moment-helpers\nonly shows the original functions, not those added by Kerby\n\n(I'm trying to figure out where we should put new correlation and covariance function, hypothesis tests, robust, regularized covariance and correlation.)\n\n", "before_files": [{"content": "# pylint: disable=W0611\nfrom . import diagnostic\nfrom .diagnostic import (\n            acorr_ljungbox, acorr_breusch_godfrey,\n            CompareCox, compare_cox, CompareJ, compare_j,\n            HetGoldfeldQuandt, het_goldfeldquandt,\n            het_breuschpagan, het_white, het_arch,\n            linear_harvey_collier, linear_rainbow, linear_lm,\n            breaks_cusumolsresid, breaks_hansen, recursive_olsresiduals,\n            unitroot_adf,\n            normal_ad, lilliefors,\n             # deprecated because of misspelling:\n            lillifors, het_breushpagan, acorr_breush_godfrey\n            )\n\nfrom . import multicomp\nfrom .multitest import (multipletests, fdrcorrection, fdrcorrection_twostage)\nfrom .multicomp import tukeyhsd\nfrom . import gof\nfrom .gof import (powerdiscrepancy, gof_chisquare_discrete,\n                  chisquare_effectsize)\nfrom . import stattools\nfrom .stattools import durbin_watson, omni_normtest, jarque_bera\n\nfrom . import sandwich_covariance\nfrom .sandwich_covariance import (\n            cov_cluster, cov_cluster_2groups, cov_nw_panel,\n            cov_hac, cov_white_simple,\n            cov_hc0, cov_hc1, cov_hc2, cov_hc3,\n            se_cov\n            )\n\nfrom .weightstats import (DescrStatsW, CompareMeans, ttest_ind, ttost_ind,\n                         ttost_paired, ztest, ztost, zconfint)\n\nfrom .proportion import (binom_test_reject_interval, binom_test,\n            binom_tost, binom_tost_reject_interval,\n            power_binom_tost, power_ztost_prop,\n            proportion_confint, proportion_effectsize,\n            proportions_chisquare, proportions_chisquare_allpairs,\n            proportions_chisquare_pairscontrol, proportions_ztest,\n            proportions_ztost)\n\nfrom .power import (TTestPower, TTestIndPower, GofChisquarePower,\n                    NormalIndPower, FTestAnovaPower, FTestPower,\n                    tt_solve_power, tt_ind_solve_power, zt_ind_solve_power)\n\nfrom .descriptivestats import Describe\n\nfrom .anova import anova_lm\n\nfrom . import moment_helpers\nfrom .correlation_tools import corr_nearest, corr_clipped, cov_nearest\n\nfrom statsmodels.sandbox.stats.runs import (Runs, runstest_1samp, runstest_2samp)\n\nfrom statsmodels.stats.contingency_tables import (mcnemar, cochrans_q,\n                                                  SquareTable,\n                                                  Table2x2,\n                                                  Table,\n                                                  StratifiedTable)\n", "path": "statsmodels/stats/api.py"}]}