evanjflack / bacondecomp

Bacon-Goodman decomposition for differences-in-differences with variation in treatment timing.
Other
46 stars 16 forks source link

Speeding up linear regression #78

Closed kylebutts closed 3 years ago

kylebutts commented 3 years ago

Would you be willing to accept a pull request that replaces lm() with the faster fixest::feols(). With many units, it will be orders of magnitudes faster as factor() is very memory-intensive and slow.

https://github.com/evanjflack/bacondecomp/blob/403cbafdc271a3c74004179fe60a1ee226055a33/R/bacon.R#L96-L97

evanjflack commented 3 years ago

Hey Kyle,

That would be great! Will be happy to review/merge when ready.

Evan

On Sun, Sep 12, 2021 at 10:27 AM Kyle F Butts @.***> wrote:

Would you be willing to accept a pull request that replaces lm() with the faster fixest::feols(). With many units, it will be orders of magnitudes faster as factor() is very memory-intensive and slow.

https://github.com/evanjflack/bacondecomp/blob/403cbafdc271a3c74004179fe60a1ee226055a33/R/bacon.R#L96-L97

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/evanjflack/bacondecomp/issues/78, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFI5SBVZAI2MSG2M5NGGOHTUBTPJNANCNFSM5D4JUWEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Evan Flack Rice '18