Skip to content

REF: method to get (non-default) robust cov from results. #2072

Open

Description

@josef-pkt

instead of just get_robustcov_results we should have (also) get_robustcov that returns the covariance matrix and not a results instance.

Usage: To write robust score tests we don't need the parameter estimates for the full model but we need the score and hessian and either score_obs or robustcov for the full model.
related: #2054

roughly

  • fit_restricted estimates the restricted parameters but has the full model
  • if we have robust cov_params of the unrestricted model evaluated at the restricted parameters, then we can plug it into the score/LM_test formula for M-estimators. (new method to come)
    We get HC, HAC or cluster robust score/LM tests with exactly the same definition as in cov_type.

possible problem, looking at base.covtype.get_robustcov_results:
We are also adjusting other things in the results instance for small sample correction like degrees of freedom.
Small sample correction might not apply correctly if we have the full model, but estimation is based on a smaller model (n_params estimated is not the same as n_params in full model)

This won't be relevant asymptotically or with chisquare based score tests, df_resid is used in scaling factor in all models (in contrast to Stata which uses it only for the linear regression).
It might be possible to use use_t=True for small sample correction, however in several models or cases Monte Carlo articles showed that score test is often conservative and using t or F would make it even more conservative. Wald test are often liberal and overreject, where t or F goes in the right direction.

We might need different small sample corrections for score/LM tests than for Wald tests.

possible solution for implementation problem:
base.covtype.get_robustcov_results could return a dict with keys of results instance that should be adjusted or added, instead of adjusting or adding it directly. Needs one extra step to fix the results instance but would make the function work without requiring a results instance.

Activity

  1. added this to the 0.7 milestone on Oct 31, 2014
  2. modified the milestones: 0.8, 0.7 on Feb 6, 2015
  3. modified the milestones: 0.8, 0.10 on Jun 1, 2018
  4. josef-pkt commented on Jun 1, 2018

    @josef-pkt
    MemberAuthor

    bump for 0.10,
    I'm working on robust score tests again in PR #2096

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions