jepusto / clubSandwich

Cluster-robust (sandwich) variance estimators with small-sample corrections
http://jepusto.github.io/clubSandwich/
47 stars 8 forks source link

New fast CRV3 estimator by MacKinnon, Nielsen & Webb #76

Open s3alfisc opened 2 years ago

s3alfisc commented 2 years ago

Hi James & coauthors,

MacKinnon, Nielsen & Webb have proposed a new fast algorithm to calculate CRV3 Jackknife variance estimators. I have implemented their CRV3 Jackknife algorithm here. It's a little hacky, but (I believe) correct and illustrates MNW's algorithm's performance gains. In particular, when clusters are large, their algorithm appears to be much faster than the CRV3 Jackknife estimator in clubSandwich.

Would you be interested in a proper PR to clubSandwich?

Best, Alex

jepusto commented 2 years ago

Hi Alex,

Thanks for reaching out. I have been studying that paper (and the paper they cite by Niccodemi and colleagues) and am interested in implementing it. However, clubSandwich is built to handle more general cases than what these papers consider (such as GEE, multilevel models, and models with many fixed effects), so I am still working on how to generalize the technique to cover all my use-cases.

I am open to pull requests that handle the basic lm() case but the changes would have to work within the existing architecture of the package to avoid short-circuiting things.

Best, James

On Apr 23, 2022, at 8:09 AM, Alexander Fischer @.***> wrote:  Hi James & coauthors,

MacKinnon, Nielsen & Webb have proposed a new fast algorithm to calculate CRV3 Jackknife variance estimators. I have implemented their CRV3 Jackknife algorithm here. It's a little hacky, but (I believe) correct and illustrates MNW's algorithm's performance gains. In particular, when clusters are large, their algorithm appears to be much faster than the CRV3 Jackknife estimator in clubSandwich.

Would you be interested in a proper PR to clubSandwich?

Best, Alex

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

s3alfisc commented 2 years ago

Ok, cool, I'll then give the basic lm() case a try! I am far from an expert on GEE's and multilevel models, so I'll pass on these. I will let you know once I'll have something to show :)