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

Feature Request: Multiway-clustering #21

Closed
Nosferican opened this issue Sep 1, 2017 · 4 comments
Closed

Feature Request: Multiway-clustering #21

Nosferican opened this issue Sep 1, 2017 · 4 comments

Comments

@Nosferican
Copy link
Contributor

Would be nice to have this functionality for StatsBase.StatisticalModel. A free distribution of the article is here.

References

Colin Cameron, Adrian, Jonah B. Gelbach, and Douglas L. Miller. 2011. "Robust Inference
With Multiway Clustering." Journal of Business & Economic Statistics 29 (2): 238-249.
doi:10.1198/jbes.2010.07136.

@Nosferican
Copy link
Contributor Author

The code is pretty simple to implement:
Given, X::AbstractMatrix the model matrix and û::AbstractVector the residuals, one only needs to define G::AbstractMatrix which is a cluster defining matrix.
V = inv(factorize(X.'X)) * X * (û * û.' .* G) * X.' inv(factorize(X.'X))
and G is a symmetric matrix which takes values true at G[i,j] ⟺ i ^ j share any clusters (same level for any dimension).

@gragusa
Copy link
Owner

gragusa commented Nov 10, 2017

Ok. I will look into it shortly

@Nosferican
Copy link
Contributor Author

I actually implemented it some time ago, I could contribute it if you are interested.

@gragusa
Copy link
Owner

gragusa commented Mar 29, 2024

Closed by #61

@gragusa gragusa closed this as completed Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants