Multi-membership models
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reviewing the allterms A-matrix handling and the updateL! path mentioned in the issue. Use the simulated person_1, person_2, and response data as a minimal example, then determine what is needed for symmetric multi-membership random effects. Done means the example can be fit with shared effects across both membership columns and the behavior is validated.
Written by the indexing model from the issue text.
Description
This is following up on a post on the Julia discourse board.
In several mixed modeling packages in R, it is possible to fit multi-membership models where each row in a data matrix might belong to several groups that are captured by a single random effect(e.g., the mm function in brms ).
This functionality is useful for network models like the social relations models where you might be trying to predict whether two people are friends based on shared characteristics. You would also want to include random effects for each person (since some people might be friendlier than others) so you might set up a model as y ~ x + (1 | person_1) + (1 | person_2). However, it doesn't matter whether a person appears as person_1 or person_2 so you want to constrain the random effects to be symmetric across both columns.
For a frequentist example, Ben Bolker has shown how to implement it in lme4 by editing the random effects matrix prior to fitting. This is a request to implement the same functionality in MixedModels in order to take advantage of the speed relative to lme4.
@dmbates pointed out that it should be possible to do something similar by editing the A matrix in allterms.
and then running updateL! before fitting.
I'm not much of a Julia programmer but here is an attempt at some simulated data for the model I described above:
x = randn(100)
b = 1
REs = randn(10)
person_1 = repeat(1:10, inner=10)
person_2 = repeat(1:10, 10)
y = a + b * x + REs[person_1] + REs[person_2]
- Dominant language
- Julia
- Stars
- 455
- Forks
- 51
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JuliaStats/MixedModels.jl
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
JuliaStats/MixedModels.jl#905 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
JuliaStats/MixedModels.jl#877 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
JuliaStats/MixedModels.jl#868 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
JuliaStats/MixedModels.jl#830 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
JuliaStats/MixedModels.jl#820 · 8 comments ·
All issues in JuliaStats/MixedModels.jl
Similar issues
-
path: splitext treats directory references and leading dots as extensionsPossibly taken @Hiten0305l claimed this today. Open
Difficulty 2/5 Half a day Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JuliaParallel/Hwloc.jl#93 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
SciML/SciMLBenchmarks.jl#1996 ·
Maintainers usually reply within 1 day
-
Affine transformations of `JohnsonSU` could return a `JohnsonSU`Possibly taken @devmotion claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JuliaStats/Distributions.jl#2117 ·
Maintainers usually reply within 2 days