Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError in discrete_choice #4

Open
cdeil opened this issue Aug 31, 2012 · 1 comment
Open

TypeError in discrete_choice #4

cdeil opened this issue Aug 31, 2012 · 1 comment

Comments

@cdeil
Copy link

cdeil commented Aug 31, 2012

mfx = affair_mod.margeff()
print pandas.Series(mfx, index=affair_mod.params.index[1:])
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-15-3f999b08521d> in <module>()
----> 1 mfx = affair_mod.margeff()
      2 print pandas.Series(mfx, index=affair_mod.params.index[1:])

/Users/deil/Library/Python/2.7/lib/python/site-packages/statsmodels-0.5.0-py2.7-macosx-10.7-x86_64.egg/statsmodels/discrete/discrete_model.pyc in margeff(self, at, method, atexog, dummy, count)
   1814                                                 self.model._derivative_exog,
   1815                                                 dummy_ind, count_ind,
-> 1816                                                 method)
   1817         # don't care about at constant
   1818         self.margeff_cov = margeff_cov[ind][:, ind]

TypeError: margeff_cov_with_se() takes exactly 10 arguments (9 given)

/Users/deil/Library/Python/2.7/lib/python/site-packages/statsmodels-0.5.0-py2.7-macosx-10.7-x86_64.egg/statsmodels/discrete/discrete_model.py:1746: FutureWarning: This method is deprecated and will be removed in 0.6.0. Use get_margeff instead
  " Use get_margeff instead", FutureWarning)
@jseabold
Copy link
Owner

Thanks, this is a bug against statsmodels. It looks like you're running the code from github. This code has been updated since the tutorial. You can use get_margeff instead of margeff, which is now deprecated. I'll need to update this part of the tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants