Skip to content

no bse in robust with norm=TrimmedMean #425

Closed

Description

@josef-pkt

I'm trying out different options for RLM.

I don't know what the answer is (non-differentiability ?)

hsalta = RLM(endog, exog, M=robust.norms.TrimmedMean()).fit()

>>> hsalta.bse
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "e:\josef\eclipsegworkspace\statsmodels-git\statsmodels-josef_new\statsmodels\base\wrapper.py", line 35, in __getattribute__
    obj = getattr(results, attr)
  File "e:\josef\eclipsegworkspace\statsmodels-git\statsmodels-josef_new\statsmodels\tools\decorators.py", line 95, in __get__
    _cachedval = self.fget(obj)
  File "e:\josef\eclipsegworkspace\statsmodels-git\statsmodels-josef_new\statsmodels\robust\robust_linear_model.py", line 467, in bse
    return np.sqrt(np.diag(self.bcov_scaled))
  File "e:\josef\eclipsegworkspace\statsmodels-git\statsmodels-josef_new\statsmodels\tools\decorators.py", line 95, in __get__
    _cachedval = self.fget(obj)
  File "e:\josef\eclipsegworkspace\statsmodels-git\statsmodels-josef_new\statsmodels\robust\robust_linear_model.py", line 425, in bcov_scaled
    m = np.mean(model.M.psi_deriv(self.sresid))
  File "e:\josef\eclipsegworkspace\statsmodels-git\statsmodels-josef_new\statsmodels\robust\norms.py", line 77, in psi_deriv
    raise NotImplementedError
NotImplementedError

Activity

  1. josef-pkt commented on Aug 13, 2012

    @josef-pkt
    MemberAuthor

    typos in norms

    method derive instead of deriv
    subzet instead of subset

    I'm not completely sure it's correct, but looks ok after fixing typos

    tests coverage?

  2. jseabold commented on Aug 13, 2012

    @jseabold
    Member

    Did you push the change or should I? There's no test because trimmed mean wasn't in SAS, but it should be correct. The derivative is simple enough here.

  3. josef-pkt commented on Aug 13, 2012

    @josef-pkt
    MemberAuthor

    I have it currently in my branch, working on LTS. To avoid merge conflicts it's easier if I do it. I'm also looking at the adjustments for trimming for the scale estimate in the Doornik paper. scale estimate is too small I guess.

  4. added a commit that references this issue on Aug 14, 2012
    93f8f55
  5. kdebrab commented on Aug 5, 2013

    @kdebrab

    Will this typo bugfix be part of 0.5.0? I hope so...

  6. jseabold commented on Aug 5, 2013

    @jseabold
    Member

    Hmm, it doesn't look like this was ever put into master. I'll apply it so it will be in the release. Thanks for the reminder.

  7. added 2 commits that reference this issue on Aug 5, 2013
    d66364a
    f59dba7
  8. added a commit that references this issue on Aug 14, 2013
    72528f4
  9. added 3 commits that reference this issue on Sep 2, 2014
    32d54a1
    8967eac
    5d36f4f
  10. added a commit that references this issue on Oct 23, 2014
    e9c3418
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