Skip to content

ENH: handling cluster_weights, freq_weights in models, cov_type, moments, descriptive statistics #7861

Open

Description

@josef-pkt

(semi-random) thought

cluster_weights as special case of freq_weights

e.g. how do we define cluster robust or panel data robust cov_type if there are freq_weights? #2829

If freq_weights are constant within cluster or group, then the freq_weights only affect aggregation across clusters and then are similar to freq_weights for cross-sectional data.

Do we need specific cluster_weights option? or
Can we compute weighted freq_weights within cluster statistics, that reduce to cluseter weighted statistics if those freq_weights are constant within cluster?

In the latter case, we wouldn't need cluster_weights, but could write unit tests based on those.

Weights in GEE are or were cluster/group weights.

NOTE: We might also have the opposite, weights within clusters, but unrelated to weighting across clusters.
An example would be IPW-style handling of missing panel or within cluster data, if missingness is not exogenous, random or completely at random.
Some approaches there are like treatment effects literature with Rubin, IPW, .... But I never went through the details for panel or cluster data case for (endogenous) missing treatment.

Activity

  1. added this to the 0.14 milestone on Nov 7, 2021
  2. josef-pkt commented on Nov 7, 2021

    @josef-pkt
    MemberAuthor

    the sandwich_covariance code still needs refactoring and cleanup
    and proper support for xxx_weights in GLM
    and informative exceptions, ValueError, if an option is really not supported (Stata raises when something is not supported with specific weights.)

    score_test still need unit test for xxx_weights, and needs to support more cov_types.
    Currently only HC0 is available as robust methods.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions