Skip to content

influence outliers breaks when regressing on constant #552

Closed

Description

@josef-pkt
>>> yy = np.array([436.5, 471.0, 128.4, 285.9])
>>> res_ols = sm.OLS(yy, np.ones(len(yy))).fit()

>>> infl = res_ols.get_influence()
>>> print infl.summary_table()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "e:\josef\eclipsegworkspace\statsmodels-git\statsmodels-all-new\statsmodels\statsmodels\stats\outliers_influence.py", line 653, in summary_table
    ('dfbeta\nslope', self.dfbetas[:,1]) #skip needs to partially unravel
IndexError: invalid index

>>> oi.summary_table(res)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "e:\josef\eclipsegworkspace\statsmodels-git\statsmodels-all-new\statsmodels\statsmodels\stats\outliers_influence.py", line 691, in summary_table
    infl = Influence(res)
NameError: global name 'Influence' is not defined

Activity

  1. josef-pkt commented on Feb 4, 2013

    @josef-pkt
    MemberAuthor

    I'm fixing the renamed Influence errors in #640 but didn't look at the constant only regression case

  2. josef-pkt commented on Feb 4, 2013

    @josef-pkt
    MemberAuthor

    I'm removing the offending line with dfbeta, in #640

    dfbeta depends on the number of parameters, and was used in an initial example, but it would make the table too wide if we included all dfbetas

    related: I don't remember all the option that we wanted to add to influence-outlier summary. needs review

  3. added a commit that references this issue on Feb 20, 2013
    92824ba
  4. added a commit that references this issue on Sep 2, 2014
    5b7fcb3
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