Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
josef-pkt opened this issue Nov 7, 2021 · 1 comment

Comments

@josef-pkt
Copy link
Member

(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.

@josef-pkt
Copy link
Member Author

josef-pkt commented Nov 7, 2021

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
Projects
None yet
Development

No branches or pull requests

1 participant