Skip to content

missing attributes/methods in subclasses #632

Open

Description

@josef-pkt

We have several backwards incompatible changes in 0.5, it might be possible to make it less so.
For example by defining default attributes and methods.

Some adjustments are missing in the sandbox/examples, and they currently raise exceptions.

I haven't looked into the following yet. It could also be that they don't inherit correctly

Traceback (most recent call last):
  File "C:\Programs\Python33\Lib\site-packages\statsmodels-0.5.0-py3.3-win32.egg\statsmodels\sandbox\examples\example_sysreg.py", line 47, in <module>
    grun_res = grun_mod.fit()
  File "C:\Programs\Python33\lib\site-packages\statsmodels-0.5.0-py3.3-win32.egg\statsmodels\sandbox\sysreg.py", line 234, in fit
    sur_fit = SysResults(self, beta, self.normalized_cov_params)
  File "C:\Programs\Python33\lib\site-packages\statsmodels-0.5.0-py3.3-win32.egg\statsmodels\sandbox\sysreg.py", line 373, in __init__
    normalized_cov_params, scale)
  File "C:\Programs\Python33\lib\site-packages\statsmodels-0.5.0-py3.3-win32.egg\statsmodels\base\model.py", line 947, in __init__
    super(LikelihoodModelResults, self).__init__(model, params)
  File "C:\Programs\Python33\lib\site-packages\statsmodels-0.5.0-py3.3-win32.egg\statsmodels\base\model.py", line 772, in __init__
    self.initialize(model, params, **kwd)
  File "C:\Programs\Python33\lib\site-packages\statsmodels-0.5.0-py3.3-win32.egg\statsmodels\base\model.py", line 778, in initialize
    self.k_constant = model.k_constant
AttributeError: 'SUR' object has no attribute 'k_constant'
Traceback (most recent call last):
  File "C:\Programs\Python33\Lib\site-packages\statsmodels-0.5.0-py3.3-win32.egg\statsmodels\sandbox\examples\ex_mixed_lls_re.py", line 152, in <module>
    print(res.t_test([1]))
  File "C:\Programs\Python33\lib\site-packages\statsmodels-0.5.0-py3.3-win32.egg\statsmodels\base\model.py", line 1134, in t_test
    LC = DesignInfo(self.model.exog_names).linear_constraint(r_matrix)
AttributeError: 'OneWayMixed' object has no attribute 'exog_names'

Activity

  1. josef-pkt commented on Aug 15, 2013

    @josef-pkt
    MemberAuthor

    I had to fix k_constant also in my nonlinearls branch.

    We still need an overview and review which attributes are required, and in which model class or which level in the class hierarchy they need are used and required.

    initialize with nan ?
    somewhat related: pylint still has many warnings that attributes are set outside of init.

  2. modified the milestones: 0.7, 0.6 on Sep 20, 2014
  3. josef-pkt commented on Sep 20, 2014

    @josef-pkt
    MemberAuthor

    move to milestone 0.7,
    There are still ongoing refactorings to make models and results more consistent.
    And ongoing refactoring for what is required to be available in a model.

  4. modified the milestones: 0.8, 0.7 on Feb 15, 2015
  5. removed this from the 0.8 milestone on Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions