Skip to content

Support for interactions and explicit nesting in blocking variables #197

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

Merged
merged 11 commits into from
Oct 1, 2019

Conversation

palday
Copy link
Member

@palday palday commented Sep 25, 2019

Closes #149 .

Added functionality:

  • Support interactions in blocking variables (1|batch&cask) (equivalent to R (1|batch:cask)).
  • Support nesting syntax (1|batch/cask) via expansion to outer and nested blocks (1|batch) + (1|batch&cask)

I'm not sure that adding the nesting syntax is truly desirable (I find it horribly confusing and it emphasizes an outdated computational perspective), but it's relatively low hanging fruit once we have the interactions in blocking variables. It's also convenient to support a wider range of the formulas lme4 supports for some of the work with RCall and JuliaCall.

Alternatively, we could just not support this syntax and add some documentation discussing how to prepare your data to use existing syntax.

@codecov-io
Copy link

codecov-io commented Sep 26, 2019

Codecov Report

Merging #197 into master will decrease coverage by <.01%.
The diff coverage is 95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #197      +/-   ##
==========================================
- Coverage   93.55%   93.54%   -0.01%     
==========================================
  Files          18       18              
  Lines        1179     1193      +14     
==========================================
+ Hits         1103     1116      +13     
- Misses         76       77       +1
Impacted Files Coverage Δ
src/randomeffectsterm.jl 97.36% <100%> (+1.21%) ⬆️
src/remat.jl 96.78% <80%> (-0.44%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b77a63...d5aa0f9. Read the comment docs.

@palday
Copy link
Member Author

palday commented Sep 27, 2019

Allowing a single term to expand into multiple terms during apply_schema would help here and also provide a relatively straightforward way to address JuliaStats/StatsModels.jl#119 .

@palday palday changed the title [WIP] Support for interactions and explicit nesting in blocking variables Support for interactions and explicit nesting in blocking variables Sep 30, 2019
@palday palday marked this pull request as ready for review September 30, 2019 16:47
@palday
Copy link
Member Author

palday commented Oct 1, 2019

@dmbates I think this is good for merge if you're okay with it.

@palday palday requested a review from dmbates October 1, 2019 13:36
Copy link
Collaborator

@dmbates dmbates left a comment

Choose a reason for hiding this comment

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

Looks good, including the removal of the comment as we discussed.

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.

Issue with interactions of random effects
4 participants