jmboehm / GLFixedEffectModels.jl

Fast estimation of generalized linear models with high dimensional categorical variables in Julia
Other
33 stars 6 forks source link

Improve compatibility with fixedeffectmodels.jl #43

Closed junder873 closed 1 year ago

junder873 commented 1 year ago

Currently this package has some conflicting exports with FixedEffectModels.jl. This makes writing functions when both are being used in a single project more difficult. However, the exports directly overlap (GLFixedEffectModels.fe is the same as FixedEffectModels.fe), so it is simpler to reuse the function from FixedEffectModels.

In addition to that change, there are a number of functions in this package that are essentially the same as their counterparts in FixedEffectModels.jl, so in this pull request I tried to simplify this package by referring to those functions where appropriate.

Finally, to address #26, this pull request updates to Vcov.jl. This update proved tricky since some of the defaults do not quite work, so this pull request adds in a specific type (VcovDataGLM) and a few changes to StatsAPI.vcov functions to create the correct residuals.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 79.62% and project coverage change: +2.26 :tada:

Comparison is base (cf5c96e) 88.63% compared to head (4b81092) 90.89%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #43 +/- ## ========================================== + Coverage 88.63% 90.89% +2.26% ========================================== Files 14 8 -6 Lines 1073 901 -172 ========================================== - Hits 951 819 -132 + Misses 122 82 -40 ``` | [Impacted Files](https://codecov.io/gh/jmboehm/GLFixedEffectModels.jl/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Johannes+Boehm) | Coverage Δ | | |---|---|---| | [src/GLFixedEffectModels.jl](https://codecov.io/gh/jmboehm/GLFixedEffectModels.jl/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Johannes+Boehm#diff-c3JjL0dMRml4ZWRFZmZlY3RNb2RlbHMuamw=) | `100.00% <ø> (+100.00%)` | :arrow_up: | | [src/utils/basecol.jl](https://codecov.io/gh/jmboehm/GLFixedEffectModels.jl/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Johannes+Boehm#diff-c3JjL3V0aWxzL2Jhc2Vjb2wuamw=) | `64.28% <ø> (+23.37%)` | :arrow_up: | | [src/utils/fixedeffects.jl](https://codecov.io/gh/jmboehm/GLFixedEffectModels.jl/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Johannes+Boehm#diff-c3JjL3V0aWxzL2ZpeGVkZWZmZWN0cy5qbA==) | `100.00% <ø> (ø)` | | | [src/GLFixedEffectModel.jl](https://codecov.io/gh/jmboehm/GLFixedEffectModels.jl/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Johannes+Boehm#diff-c3JjL0dMRml4ZWRFZmZlY3RNb2RlbC5qbA==) | `80.62% <47.36%> (ø)` | | | [src/fit.jl](https://codecov.io/gh/jmboehm/GLFixedEffectModels.jl/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Johannes+Boehm#diff-c3JjL2ZpdC5qbA==) | `85.31% <95.23%> (+0.45%)` | :arrow_up: | | [src/utils/biascorr.jl](https://codecov.io/gh/jmboehm/GLFixedEffectModels.jl/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Johannes+Boehm#diff-c3JjL3V0aWxzL2JpYXNjb3JyLmps) | `97.46% <100.00%> (ø)` | | | [src/utils/vcov.jl](https://codecov.io/gh/jmboehm/GLFixedEffectModels.jl/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Johannes+Boehm#diff-c3JjL3V0aWxzL3Zjb3Yuamw=) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

jmboehm commented 1 year ago

Great, thank you. I had preferred to not make FixedEffectModels a dependency but only FixedEffects (the former changes more often, and therefore there may be more maintenance required), but I agree that much code is overlapping between the two packages. I'll tag a new release with this.