Skip to content

REF/ENH: cov_type assumes nobs k_params from score_obs #2827

Open

Description

@josef-pkt

The small sample correction define nobs and k_params from the shape of xu

if use_correction:
    nobs, k_params = xu.shape
    ....

this doesn't generalize, work correctly for ddof (absorbed params, for params that are not in score (*)) and not for frequency weights.

(*) how would this handle an overidentified case in GMM (GMM still has it's own sandwich code)

looked at because of #2805 freq_weights in GLM: cov_type = 'HC0' doesn't work in the current setting. However, the bse are not proportionally wrong, so it's not the small sample correction here.
actually: currently use_correction is always false for HC in GLM see #2828

Activity

  1. josef-pkt commented on Feb 21, 2016

    @josef-pkt
    MemberAuthor

    I guess we have to get df_resid as optional parameter through to all functions that use it. It's possible that we need somewhere separately nobs, k_params, and n_groups or similar.

    In the results interface we can put it together with xu, hessianinv into the basic helper function.

  2. added this to the 0.9 milestone on Jun 21, 2016
  3. modified the milestones: 0.9, 0.10 on Oct 3, 2017
  4. josef-pkt commented on Oct 3, 2017

    @josef-pkt
    MemberAuthor

    postponed to 0.10, Refactoring cov_type is delayed.

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