Poisson predict breaks on list #1032

Closed
josef-pkt opened this Issue Aug 9, 2013 · 0 comments

Projects

None yet

1 participant

@josef-pkt
Member

running an example with Poisson
mod = sm.Poisson(count, ex)

>>> res.predict(exog=[1, 1, 0, 0], linear=False)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "e:\josef\eclipsegworkspace\statsmodels-git\statsmodels-all-new2\statsmodels\statsmodels\base\model.py", line 880, in predict
    return self.model.predict(self.params, exog, *args, **kwargs)
  File "e:\josef\eclipsegworkspace\statsmodels-git\statsmodels-all-new2\statsmodels\statsmodels\discrete\discrete_model.py", line 682, in predict
    return np.exp(np.dot(exog, params[:exog.shape[1]]) + exposure + offset) # not cdf
AttributeError: 'list' object has no attribute 'shape'
@guyrt guyrt added a commit to guyrt/statsmodels that referenced this issue Nov 7, 2013
@guyrt guyrt BUG: Fixed issue #1032 - Poisson predict breaks on list b5a39a3
@josef-pkt josef-pkt closed this in #1254 Dec 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment