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

Initial Release #3

Merged
merged 18 commits into from
Oct 22, 2021
Merged

Initial Release #3

merged 18 commits into from
Oct 22, 2021

Conversation

palday
Copy link
Collaborator

@palday palday commented Oct 21, 2021

Supercedes #2 as a local pull.

@kleinschmidt todo

  • enable GH-Pages
  • verify doc deployment
  • enable branch protection for main and only allow squash merging.

Project.toml Outdated Show resolved Hide resolved
Comment on lines +16 to +23
<!--
## Examples

```julia
using RegressionFormulae, StatsModels, GLM, DataFrames

```
-->
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example is commented out for now because examples are nice, but ain't nobody got time to write nice ones.

"a & b & c", "a & b & d", "a & c & d", "b & c & d"]

m = fit(DummyMod, @formula(y ~ (1 + a + b + c + d)^3), dat)
@test_broken coefnames(m) == ["(Intercept)", "a", "b", "c", "d",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we should avoid computing interactions with the intercept, but I'm not sure if this is a "garbage in, garbage out" scenario or whether we should be more helpful here.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +34 to +39
@testset "embedded interactions" begin
m = fit(DummyMod, @formula(y ~ (a + b + c * d)^3), dat)
cn = coefnames(m)
@test_broken !("a & c & c & d" in cn)
@test_broken cn == unique(cn)
end
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken tests to highlight broken functionality 😉

@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2021

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

Copy link
Owner

@kleinschmidt kleinschmidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think one design decision to make here is whether to actually enforce the expectation that the grouping term in / will be full dummy. If we're generating a + a & b from a/b then a SHOULD be promoted to full dummy by the normal mechanisms if b isn't specified somewhere else. When b IS specified somewhere else, manually specifying full dummy will lead to malformed models...

Comment on lines +16 to +21
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
StatsModels = "3eaba693-59b7-5ba5-a881-562e759f1c8d"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
test = ["StatsBase", "StatsModels", "Test"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we're not supporting <1.6 twe could just use the test/Project.toml approach instsead

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also thought about doing that, but given the small set of dependencies for the tests, I just stayed this way. If we wind up with more extensive dependencies, then I would probably change over

import StatsModels: apply_schema
using StatsModels: apply_schema
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just need to make sure that it's qualified when we're overloading those methods...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are 😉

src/nesting.jl Outdated Show resolved Hide resolved
Co-authored-by: Dave Kleinschmidt <[email protected]>
@palday
Copy link
Collaborator Author

palday commented Oct 22, 2021

I think one design decision to make here is whether to actually enforce the expectation that the grouping term in / will be full dummy. If we're generating a + a & b from a/b then a SHOULD be promoted to full dummy by the normal mechanisms if b isn't specified somewhere else. When b IS specified somewhere else, manually specifying full dummy will lead to malformed models...

Yeah, I think there are some really weird edge cases with some of these things that we're only really going to figure out when we see them used in practice. I think our current approach -- a/b expands to a + fulldummy(a) & b is a simple enough rule to understand, that it makes a good first pass.

@palday palday merged commit f3e8daf into main Oct 22, 2021
@palday palday deleted the pa/releaseready branch October 22, 2021 14:26
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

Successfully merging this pull request may close these issues.

3 participants