internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: statsmodels/statsmodels

Issue:
Confusing code in KDEMultivariateConditional.pdf method disagrees with documentation
In the function [kernel_density.KDEMultivariateConditional.pdf](https://github.com/statsmodels/statsmodels/blob/master/statsmodels/nonparametric/kernel_density.py#L481-L531) there is disagreement between the documentation, which uses `f(X|Y) = f(X,Y)/f(Y)` and the code, which is computing `f(X,Y)/f(X)`. Now, lines 526-528 do suggest that the denominator is the right value (the pdf of the exogenous variables) so it might be worth clarifying the situation.



Discussion:
Thanks for reporting, Do you want to open a PR to fix it?

It looks like a mistake in the documentation in the pdf method. The class docstring has the correct conditional p(y|x).
The documentation should also mention that y is endog and x is exog in the method arguments,.


Resolving patch:
diff --git a/statsmodels/nonparametric/kernel_density.py b/statsmodels/nonparametric/kernel_density.py
--- a/statsmodels/nonparametric/kernel_density.py
+++ b/statsmodels/nonparametric/kernel_density.py
@@ -460,7 +460,7 @@ def loo_likelihood(self, bw, func=lambda x: x):
 
         Notes
         -----
-        Similar to ``KDE.loo_likelihood`, but substitute ``f(y|x)=f(x,y)/f(y)``
+        Similar to ``KDE.loo_likelihood`, but substitute ``f(y|x)=f(x,y)/f(x)``
         for ``f(x)``.
         """
         yLOO = LeaveOneOut(self.data)
@@ -499,12 +499,12 @@ def pdf(self, endog_predict=None, exog_predict=None):
         -----
         The formula for the conditional probability density is:
 
-        .. math:: f(X|Y)=\frac{f(X,Y)}{f(Y)}
+        .. math:: f(y|x)=\frac{f(x,y)}{f(x)}
 
         with
 
-        .. math:: f(X)=\prod_{s=1}^{q}h_{s}^{-1}k
-                            \left(\frac{X_{is}-X_{js}}{h_{s}}\right)
+        .. math:: f(x)=\prod_{s=1}^{q}h_{s}^{-1}k
+                            \left(\frac{x_{is}-x_{js}}{h_{s}}\right)
 
         where :math:`k` is the appropriate kernel for each variable.
         """


Test patch:
Repository: statsmodels/statsmodels

Issue:
BUG: pass alpha to wls_prediction_std
Hello,

This is a rather quick attempt at solving #3344. 

I don't have any unittests for this... happy for ideas. 

Thanks.


Discussion:

Resolving patch:
diff --git a/statsmodels/stats/outliers_influence.py b/statsmodels/stats/outliers_influence.py
--- a/statsmodels/stats/outliers_influence.py
+++ b/statsmodels/stats/outliers_influence.py
@@ -665,7 +665,8 @@ def summary_table(self, float_fmt="%6.3f"):
 
 
 def summary_table(res, alpha=0.05):
-    '''generate summary table of outlier and influence similar to SAS
+    """
+    Generate summary table of outlier and influence similar to SAS
 
     Parameters
     ----------
@@ -680,8 +681,7 @@ def summary_table(res, alpha=0.05):
        calculated measures and statistics for the table
     ss2 : list of strings
        column_names for table (Note: rows of table are observations)
-
-    '''
+    """
 
     from scipy import stats
     from statsmodels.sandbox.regression.predstd import wls_prediction_std
@@ -699,7 +699,9 @@ def summary_table(res, alpha=0.05):
 
 
     #standard error for predicted observation
-    predict_se, predict_ci_low, predict_ci_upp = wls_prediction_std(res)
+    tmp = wls_prediction_std(res, alpha=alpha)
+    predict_se, predict_ci_low, predict_ci_upp = tmp
+
     predict_ci = np.column_stack((predict_ci_low, predict_ci_upp))
 
     #standard deviation of residual


Test patch:
diff --git a/statsmodels/stats/tests/test_diagnostic.py b/statsmodels/stats/tests/test_diagnostic.py
--- a/statsmodels/stats/tests/test_diagnostic.py
+++ b/statsmodels/stats/tests/test_diagnostic.py
@@ -693,7 +693,11 @@ def test_outlier_influence_funcs():
     x = add_constant(np.random.randn(10, 2))
     y = x.sum(1) + np.random.randn(10)
     res = OLS(y, x).fit()
-    oi.summary_table(res, alpha=0.05)
+    out_05 = oi.summary_table(res)
+    # GH3344 : Check alpha has an effect
+    out_01 = oi.summary_table(res, alpha=0.01)
+    assert_(np.all(out_01[1][:, 6] <= out_05[1][:, 6]))
+    assert_(np.all(out_01[1][:, 7] >= out_05[1][:, 7]))
 
     res2 = OLS(y, x[:,0]).fit()
     oi.summary_table(res2, alpha=0.05)
Repository: statsmodels/statsmodels

Issue:
SARIMAX predict does not actually allow for datetime start/end
Docs indicate it does, but TimeSeriesModel._get_predict_start requires either a string or an int.



Discussion:
I came here to also report that datetime doesn't look to be allowed for the `predict` method of a `<class 'statsmodels.tsa.arima_model.ARIMAResultsWrapper'>` instance which I'm calling `result`.

Example:
This works:
`result.predict(start='2015-10-07', end='2015-10-07')`

This does not work:
`result.predict(start=datetime.date(2015,10,7), end=datetime.date(2015,10,7))`

Error given:
`TypeError: unorderable types: datetime.date() > int()`

Documentation Reference:
http://statsmodels.sourceforge.net/devel/generated/statsmodels.tsa.arima_model.ARIMA.predict.html

I don't remember which code SARIMAX shares, but we might have fixed this in the last 2 months or so for ARMA/ARIMA. (this issue is missing labels, so we might have missed this, or missed to close this.)

@jaradc  Which statsmodels version are you using?  

When I do pip freeze, in the list, it shows `statsmodels==0.6.1`

Issue raised by jaradc is still there. I'm using statsmodels==0.8.0rc1

Resolving patch:
diff --git a/statsmodels/tsa/base/tsa_model.py b/statsmodels/tsa/base/tsa_model.py
--- a/statsmodels/tsa/base/tsa_model.py
+++ b/statsmodels/tsa/base/tsa_model.py
@@ -155,6 +155,9 @@ def _get_predict_end(self, end):
         dates = self.data.dates
         freq = self.data.freq
 
+        if isinstance(end, datetime.datetime):
+            end = self._str_to_date(str(end))
+
         if isinstance(end, str) or (dates is not None
                                     and isinstance(end, type(dates[0]))):
             if dates is None:


Test patch:
diff --git a/statsmodels/tsa/base/tests/test_base.py b/statsmodels/tsa/base/tests/test_base.py
--- a/statsmodels/tsa/base/tests/test_base.py
+++ b/statsmodels/tsa/base/tests/test_base.py
@@ -4,6 +4,7 @@
 from statsmodels.tsa.base.datetools import _freq_to_pandas
 from statsmodels.tsa.base.tsa_model import TimeSeriesModel
 from statsmodels.tools.testing import assert_equal, assert_raises
+from datetime import datetime
 
 
 def test_pandas_nodates_index():
@@ -106,3 +107,17 @@ def test_pandas_dates():
     model = TimeSeriesModel(df['price'])
 
     assert_equal(model.data.dates, result.index)
+
+def test_get_predict_start_end():
+    index = pd.DatetimeIndex(start='1970-01-01', end='1990-01-01', freq='AS')
+    endog = pd.Series(np.zeros(10), index[:10])
+    model = TimeSeriesModel(endog)
+
+    predict_starts = [1, '1971-01-01', datetime(1971, 1, 1), index[1]]
+    predict_ends = [20, '1990-01-01', datetime(1990, 1, 1), index[-1]]
+
+    for start in predict_starts:
+        assert_equal(model._get_predict_start(start), 1)
+
+    for end in predict_ends:
+        assert_equal(model._get_predict_end(end), (9, 11))
Repository: statsmodels/statsmodels

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.)



Discussion:

Resolving patch:
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)
 


Test patch:
Repository: statsmodels/statsmodels

Issue:
DOC: Broken link in sw
The docstring in sandwich_covariance refers to

http://pubs.amstat.org/doi/abstract/10.1198/jbes.2010.07136

which is not loading for me.  Any idea what used to be there?  I can take a look for a replacement and/or substitute.

Tangentially related: what does "HCCM" stand for?


Discussion:
searching for the doi 

http://dx.doi.org/10.1198/jbes.2010.07136

amstat are now published by T&F
http://www.tandfonline.com/doi/abs/10.1198/jbes.2010.07136
HC stands for Heteroscedasticity Consistent, like HC0, HC1 are standard abbreviation

so I gues HCCM is heteroscedasticity consistent covariance matrix.

Skipper started this and I never thought about it.


Resolving patch:
diff --git a/statsmodels/stats/sandwich_covariance.py b/statsmodels/stats/sandwich_covariance.py
--- a/statsmodels/stats/sandwich_covariance.py
+++ b/statsmodels/stats/sandwich_covariance.py
@@ -17,10 +17,10 @@
 pinv(x) scale pinv(x)   used currently in linear_model, with scale is
 1d (or diagonal matrix)
 (x'x)^(-1) x' scale x (x'x)^(-1),  scale in general is (nobs, nobs) so
-pretty large
-general formulas for scale in cluster case are in
-http://pubs.amstat.org/doi/abstract/10.1198/jbes.2010.07136 which also
-has the second version
+pretty large general formulas for scale in cluster case are in [4],
+which can be found (as of 2017-05-20) at 
+http://www.tandfonline.com/doi/abs/10.1198/jbes.2010.07136
+This paper also has the second version.
 
 version 2:
 (x'x)^(-1) S (x'x)^(-1)    with S = x' scale x,    S is (kvar,kvars),
@@ -79,18 +79,18 @@
 
 References
 ----------
-John C. Driscoll and Aart C. Kraay, “Consistent Covariance Matrix Estimation
+[1] John C. Driscoll and Aart C. Kraay, “Consistent Covariance Matrix Estimation
 with Spatially Dependent Panel Data,” Review of Economics and Statistics 80,
 no. 4 (1998): 549-560.
 
-Daniel Hoechle, "Robust Standard Errors for Panel Regressions with
+[2] Daniel Hoechle, "Robust Standard Errors for Panel Regressions with
 Cross-Sectional Dependence", The Stata Journal
 
-Mitchell A. Petersen, “Estimating Standard Errors in Finance Panel Data
+[3] Mitchell A. Petersen, “Estimating Standard Errors in Finance Panel Data
 Sets: Comparing Approaches,” Review of Financial Studies 22, no. 1
 (January 1, 2009): 435 -480.
 
-A. Colin Cameron, Jonah B. Gelbach, and Douglas L. Miller, “Robust Inference
+[4] A. Colin Cameron, Jonah B. Gelbach, and Douglas L. Miller, “Robust Inference
 With Multiway Clustering,” Journal of Business and Economic Statistics 29
 (April 2011): 238-249.
 
@@ -159,6 +159,7 @@
 
 '''
 
+# Note: HCCM stands for Heteroskedasticity Consistent Covariance Matrix
 def _HCCM(results, scale):
     '''
     sandwich with pinv(x) * diag(scale) * pinv(x).T


Test patch:
Repository: statsmodels/statsmodels

Issue:
BUG/REF: location of design_info, wald_test_terms uses old location
https://github.com/statsmodels/statsmodels/blob/master/statsmodels/base/model.py#L1481
`design_info = getattr(result.model.data.orig_exog, 'design_info', None)`

It doesn't raise an error in the test run. Maybe silently deprecated. ?



Discussion:
new line in code is https://github.com/statsmodels/statsmodels/blob/master/statsmodels/base/model.py#L1580

still wrong!?
`result.model.data.orig_exog.design_info` is still there (in a MixedLM example that I have open right now)
It wouldn't be available after pickling/unpickling, nor once we remove it.

based on reading the unit tests, some of them should fail if design_info is not found, and is set to None.

Resolving patch:
diff --git a/statsmodels/base/model.py b/statsmodels/base/model.py
--- a/statsmodels/base/model.py
+++ b/statsmodels/base/model.py
@@ -1577,7 +1577,7 @@ def wald_test_terms(self, skip_single=False, extra_constraints=None,
             extra_constraints = []
         if combine_terms is None:
             combine_terms = []
-        design_info = getattr(result.model.data.orig_exog, 'design_info', None)
+        design_info = getattr(result.model.data, 'design_info', None)
 
         if design_info is None and extra_constraints is None:
             raise ValueError('no constraints, nothing to do')


Test patch:
diff --git a/statsmodels/base/tests/test_generic_methods.py b/statsmodels/base/tests/test_generic_methods.py
--- a/statsmodels/base/tests/test_generic_methods.py
+++ b/statsmodels/base/tests/test_generic_methods.py
@@ -453,7 +453,6 @@ def initialize(cls):
         mod = ols("np.log(Days+1) ~ C(Duration, Sum)*C(Weight, Sum)", cls.data)
         cls.res = mod.fit()  # default use_t=True
 
-
     def test_predict_missing(self):
         ex = self.data[:5].copy()
         ex.iloc[0, 1] = np.nan
Repository: statsmodels/statsmodels

Issue:
BUG: OLS on constant raises for f_value with cov_type='hac'
`f_value` based on wald_test which is used if cov_type is robust break in regression on constant only.


```
res_diff = OLS(diff, np.ones(len(diff))).fit(cov_type='hac', cov_kwds={'maxlags': 5})
res_diff.fvalue
print(res_diff.summary())
```

raises in patsy because the constraint for wald_test is empty. `summary` raises exception

```
C:\...\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages\patsy\constraint.py in __init__(self, variable_names, coefs, constants)
     56             raise ValueError("wrong shape for coefs")
     57         if self.coefs.shape[0] == 0:
---> 58             raise ValueError("must have at least one row in constraint matrix")
     59         if self.coefs.shape[0] != self.constants.shape[0]:
     60             raise ValueError("shape mismatch between coefs and constants")

ValueError: must have at least one row in constraint matrix
```

usecase: I wanted to estimate the mean of a series using hac standard errors


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
@@ -1580,6 +1580,8 @@ def fvalue(self):
                 idx = lrange(k_params)
                 idx.pop(const_idx)
                 mat = mat[idx]  # remove constant
+                if mat.size == 0:  # see  #3642
+                    return np.nan
             ft = self.f_test(mat)
             # using backdoor to set another attribute that we already have
             self._cache['f_pvalue'] = ft.pvalue


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
@@ -1128,6 +1128,7 @@ def test_missing_formula_predict():
 
 
 def test_fvalue_implicit_constant():
+    # if constant is implicit, return nan see #2444
     nobs = 100
     np.random.seed(2)
     x = np.random.randn(nobs, 1)
@@ -1147,6 +1148,26 @@ def test_fvalue_implicit_constant():
     res.summary()
 
 
+def test_fvalue_only_constant():
+    # if only constant in model, return nan see #3642
+    nobs = 20
+    np.random.seed(2)
+    x = np.ones(nobs)
+    y = np.random.randn(nobs)
+
+    from statsmodels.regression.linear_model import OLS, WLS
+
+    res = OLS(y, x).fit(cov_type='hac', cov_kwds={'maxlags': 3})
+    assert_(np.isnan(res.fvalue))
+    assert_(np.isnan(res.f_pvalue))
+    res.summary()
+
+    res = WLS(y, x).fit(cov_type='HC1')
+    assert_(np.isnan(res.fvalue))
+    assert_(np.isnan(res.f_pvalue))
+    res.summary()
+
+
 def test_ridge():
     n = 100
     p = 5
Repository: statsmodels/statsmodels

Issue:
Remove un-picklable method in __getstate__
Add a test that fails without this fix.  In particular, cov_params_func key gets set in fit_regularized.

The test is taken directly from GH #2686


Discussion:

Resolving patch:
diff --git a/statsmodels/discrete/discrete_model.py b/statsmodels/discrete/discrete_model.py
--- a/statsmodels/discrete/discrete_model.py
+++ b/statsmodels/discrete/discrete_model.py
@@ -3272,11 +3272,13 @@ def __init__(self, model, mlefit, cov_type='nonrobust', cov_kwds=None,
 
 
     def __getstate__(self):
-        try:
-            #remove unpicklable callback
-            self.mle_settings['callback'] = None
-        except (AttributeError, KeyError):
-            pass
+        # remove unpicklable methods
+        mle_settings = getattr(self, 'mle_settings', None)
+        if mle_settings is not None:
+            if 'callback' in mle_settings:
+                mle_settings['callback'] = None
+            if 'cov_params_func' in mle_settings:
+                mle_settings['cov_params_func'] = None
         return self.__dict__
 
     @cache_readonly


Test patch:
diff --git a/statsmodels/base/tests/test_shrink_pickle.py b/statsmodels/base/tests/test_shrink_pickle.py
--- a/statsmodels/base/tests/test_shrink_pickle.py
+++ b/statsmodels/base/tests/test_shrink_pickle.py
@@ -270,9 +270,22 @@ def setup(self):
         self.results = sm.OLS.from_formula("Y ~ log(A) + B * C", data=self.data).fit()
 
 
+class TestRemoveDataPicklePoissonRegularized(RemoveDataPickle):
+
+    def setup(self):
+        #fit for each test, because results will be changed by test
+        x = self.exog
+        np.random.seed(987689)
+        y_count = np.random.poisson(np.exp(x.sum(1) - x.mean()))
+        model = sm.Poisson(y_count, x)
+        self.results = model.fit_regularized(method='l1', disp=0, alpha=10)
+
+
+
 if __name__ == '__main__':
     for cls in [TestRemoveDataPickleOLS, TestRemoveDataPickleWLS,
                 TestRemoveDataPicklePoisson,
+                TestRemoveDataPicklePoissonRegularized,
                 TestRemoveDataPickleNegativeBinomial,
                 TestRemoveDataPickleLogit, TestRemoveDataPickleRLM,
                 TestRemoveDataPickleGLM]:
Repository: statsmodels/statsmodels

Issue:
BUG/REF: IV2SLS circular reference
IV2SLS is still attaching the results class to the model

```
        self._results = lfit  # TODO : remove this
        self._results_ols2nd = OLS(y, xhat).fit()
```

We dropped this pattern a long time ago because the circular reference slows down garbage collection.


Discussion:

Resolving patch:
diff --git a/statsmodels/sandbox/regression/gmm.py b/statsmodels/sandbox/regression/gmm.py
--- a/statsmodels/sandbox/regression/gmm.py
+++ b/statsmodels/sandbox/regression/gmm.py
@@ -153,13 +153,12 @@ def fit(self):
                        normalized_cov_params=self.normalized_cov_params)
 
         lfit.exog_hat_params = xhatparams
-        lfit.exog_hat = xhat # TODO: do we want to store this, might be large
-        self._results = lfit  # TODO : remove this
+        lfit.exog_hat = xhat  # TODO: do we want to store this, might be large
         self._results_ols2nd = OLS(y, xhat).fit()
 
         return RegressionResultsWrapper(lfit)
 
-    #copied from GLS, because I subclass currently LikelihoodModel and not GLS
+    # copied from GLS, because I subclass currently LikelihoodModel and not GLS
     def predict(self, params, exog=None):
         """
         Return linear predicted values from a design matrix.
@@ -181,16 +180,8 @@ def predict(self, params, exog=None):
         """
         if exog is None:
             exog = self.exog
-        return np.dot(exog, params)
-        #JP: this doesn't look correct for GLMAR
-        #SS: it needs its own predict method
-        if self._results is None and params is None:
-            raise ValueError("If the model has not been fit, then you must specify the params argument.")
-        if self._results is not None:
-            return np.dot(exog, self._results.params)
-        else:
-            return np.dot(exog, params)
 
+        return np.dot(exog, params)
 
 
 class IVRegressionResults(RegressionResults):


Test patch:
diff --git a/statsmodels/sandbox/regression/tests/test_gmm.py b/statsmodels/sandbox/regression/tests/test_gmm.py
--- a/statsmodels/sandbox/regression/tests/test_gmm.py
+++ b/statsmodels/sandbox/regression/tests/test_gmm.py
@@ -96,6 +96,9 @@ def test_iv2sls_r():
     #assert_allclose(res.bse * np.sqrt((n - k) / (n - k - 1.)), bse,
     assert_allclose(res.bse, bse, rtol=0, atol=3e-7)
 
+    # GH 3849
+    assert not hasattr(mod, '_results')
+
 
 
 def test_ivgmm0_r():
Repository: statsmodels/statsmodels

Issue:
The compat modules should use absolute imports
The [statsmodels.compat.collections](https://github.com/statsmodels/statsmodels/blob/a88830efc3a99cfbe0ebc9fbfd77820fe748fc59/statsmodels/compat/collections.py#L7) imports the namesake standard library module without requesting absolute imports.  While it seems to work in many cases, it causes a problem to packages that override `__import__`.  See enlnt/pyq#18.

Please consider adding

```python
from __future__ import absolute_import
```
to the compat modules.


Discussion:

Resolving patch:
diff --git a/statsmodels/compat/collections.py b/statsmodels/compat/collections.py
--- a/statsmodels/compat/collections.py
+++ b/statsmodels/compat/collections.py
@@ -1,6 +1,7 @@
 '''backported compatibility functions for Python's collections
 
 '''
+from __future__ import absolute_import
 
 try:
     #python >= 2.7


Test patch:
Repository: statsmodels/statsmodels

Issue:
BUG/ENH tsa ARMA with formulas, from_formula doesn't work
http://stackoverflow.com/questions/31483915/arima-from-formula-with-pandas-dataframe

Briefly trying an example, I don't manage to get from_formula to work. Based on a code search, it is not unit tested, and the inherited method is not overwritten.

needs investigation, and most likely some fixes

I haven't checked whether `SARIMAX.form_formula` works



Discussion:
As motivation: 
In my recent fixes for ARMA with exog and the comparison to GLSAR, it looks like ARIMAX is a good version of linear model (OLS type) with ARMA errors/residuals. But it looks like it doesn't have all the support yet, it's partially still based on the univariate time series history or tradition.

In SARIMAX, it should raise a NotImplementedError.


Resolving patch:
diff --git a/statsmodels/tsa/arima_model.py b/statsmodels/tsa/arima_model.py
--- a/statsmodels/tsa/arima_model.py
+++ b/statsmodels/tsa/arima_model.py
@@ -973,6 +973,12 @@ def fit(self, start_params=None, trend='c', method="css-mle",
         armafit.mle_settings = mlefit.mle_settings
         return ARMAResultsWrapper(armafit)
 
+    # base class of "from_formula" is "class Model(object)"
+    @classmethod
+    def from_formula(cls, formula, data, subset=None, drop_cols=None, *args, **kwargs):
+        raise NotImplementedError("from_formula is not supported"
+                                  " for ARMA models.")
+
 
 #NOTE: the length of endog changes when we give a difference to fit
 #so model methods are not the same on unfit models as fit ones


Test patch:
diff --git a/statsmodels/tsa/tests/test_arima.py b/statsmodels/tsa/tests/test_arima.py
--- a/statsmodels/tsa/tests/test_arima.py
+++ b/statsmodels/tsa/tests/test_arima.py
@@ -2302,6 +2302,12 @@ def test_arima_pickle():
     assert_almost_equal(res.pvalues, pkl_res.pvalues)
 
 
+def test_arima_not_implemented():
+    formula = ' WUE ~ 1 + SFO3 '
+    data = [-1214.360173, -1848.209905, -2100.918158]
+    assert_raises(NotImplementedError, ARIMA.from_formula, formula, data)
+
+
 if __name__ == "__main__":
     import pytest
     pytest.main([__file__, '-vvs', '-x', '--pdb'])