Say where `.member_contrast_*` columns may be used
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- r
- Domain
- documentation
Research direction
Start with the prepare_dyad_data() help for its seed argument and return value, then find the exchangeable section of the APIM vignette. Add the suggested guidance in both places: use .member_contrast_* only in its own random-effect block, separate from the shared block. Done when both documentation locations include the same guidance.
Written by the indexing model from the issue text.
Description
The .member_contrast_* columns assign +1 and -1 to the two members of a dyad at random. The documented exchangeable model uses the column in one place only: a random-effect block of its own, next to a separate shared block. That model gives the same results for every seed.
Other uses depend on the random assignment. The docs call the assignment arbitrary, but they do not say where the column belongs.
Example
library(dyadMLM)
for (s in 1:3) {
p <- prepare_dyad_data(
dyads_cross, dyad = coupleID, member = personID, role = gender,
keep_compositions = "female-female", model_types = "none", seed = s
)
m <- glmmTMB::glmmTMB(
closeness ~ 1 + .member_contrast_arbitrary + # fixed effect of the contrast
us(1 | coupleID) + us(0 + .member_contrast_arbitrary | coupleID),
dispformula = ~0, data = p
)
print(logLik(m))
}
#> -413.87, -413.46, -412.10
A single block such as us(1 + .member_contrast_arbitrary | coupleID) depends on the seed in the same way. recover_exchangeable_covariance() refuses that block. A fixed effect of the contrast is fitted without any message.
Suggested fix and checks
- Add one sentence to the
seedargument and the return value in theprepare_dyad_data()help. - Add the same sentence to the exchangeable section of the APIM vignette.
- Suggested wording: "Use this column only in a random-effect block of its own, separate from the shared block. If results change with
seed, the column is used somewhere else."
- Dominant language
- R
- Stars
- 1
- Forks
- 2
- Avg merge
- 11h 4m
- Merged PRs (30d)
- 42
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the 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 Pascal-Kueng/dyadMLM
-
Add two cautions to the `simulate_dyad_responses()` helpPossibly taken A pull request linked to this issue is open or already merged. Opendocumentation priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Pascal-Kueng/dyadMLM#179 ·
Maintainers usually reply within 1 day
-
documentation priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Pascal-Kueng/dyadMLM#178 ·
Maintainers usually reply within 1 day
-
Describe the brms summaries of `recover_exchangeable_covariance()` accuratelyPossibly taken A pull request linked to this issue is open or already merged. Opendocumentation good first issue priority: low
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
Pascal-Kueng/dyadMLM#177 ·
Maintainers usually reply within 1 day
-
bug good first issue priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Pascal-Kueng/dyadMLM#173 ·
Maintainers usually reply within 1 day
-
documentation good first issue priority: low
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Pascal-Kueng/dyadMLM#171 ·
Maintainers usually reply within 1 day
All issues in Pascal-Kueng/dyadMLM
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
cran-task-views/Spatial#127 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Consider changesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OHDSI/OmopSketch#618 ·