Consider couple-clustered robust SEs in the generalized vignette
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- r
- Domain
- documentation
Research direction
Read dev/vignettes/generalized-apim.Rmd first to see the existing generalized-model structure, then check how sandwich::vcovCL() clusters on coupleID and which fit objects (stats::glm(), ordinal::clm()) actually support the sandwich score method — see the linked sandwich estfun.R for clm() restrictions. Run a small simulation (bias, coverage, false-positive rate, power with few vs many couples) evaluating marginal effects, not conditional coefficients. Done means a short vignette section plus one worked example fitting a model, computing couple-clustered SEs, and interpreting them, with the limitations stated; no new dyadMLM function required.
Written by the indexing model from the issue text.
Description
What would you like to improve?
Consider a short section in dev/vignettes/generalized-apim.Rmd on marginal generalized models with standard errors clustered by couple, using sandwich::vcovCL().
This could provide an alternative for estimating population-average actor and partner effects when a suitable latent covariance structure is difficult to fit or identify, including for ordinal outcomes. Treat it as an option to evaluate before recommending it.
What to assess
- Start with ordinary generalized linear models (
stats::glm(), for example binary or count outcomes) and ordinal cumulative-link models (ordinal::clm()), without random effects. Cluster by the wholecoupleIDso inference allows both same-occasion partner dependence and dependence across occasions, assuming independent couples. - Explain the change from conditional mixed-model effects to marginal effects. Preserve the within-person/between-person predictor decomposition. Robust SEs cannot repair a misspecified marginal mean or category-probability model; in particular, averaging over random effects need not preserve proportional odds.
- Verify supported model classes, links, and package versions. Basic
clm()has sandwich support, but its score method requires flexible thresholds and does not support scale regression. Do not assume the same workflow works forclmm()or arbitraryglmmTMBfits, or providesclubSandwichCR2 corrections. Explain the limitations with few independent couples. - Before recommending a workflow, use a small targeted simulation to check bias, interval coverage, false-positive rates, and power under partner/time dependence, with few and many couples. Evaluate the intended marginal effect, rather than comparing it directly with a conditional mixed-model coefficient.
- If suitable, add one minimal worked example showing fitting, couple-clustered SEs, and inference using that covariance matrix, followed by a brief explanation of when to choose this approach. Retain guidance on checking the marginal model.
The initial scope is evaluating and documenting an existing workflow; no new dyadMLM function is needed.
References
- Dominant language
- R
- Stars
- 1
- Forks
- 2
- Avg merge
- 9h 28m
- Merged PRs (30d)
- 21
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
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Pascal-Kueng/dyadMLM#92 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Pascal-Kueng/dyadMLM#83 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Pascal-Kueng/dyadMLM#71 · 2 comments ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Pascal-Kueng/dyadMLM#70 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Pascal-Kueng/dyadMLM#69 ·
Maintainers usually reply within 1 day
All issues in Pascal-Kueng/dyadMLM
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
mitchelloharawild/ggtime#39 ·
-
enhancement good first issue help wanted
Difficulty 2/5 Half a day Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Breaking 🏴☠️ Consistency :green_apple: :apple:
Difficulty 1/5 Under an hour Newbie friendliness 70/100
easystats/bayestestR#789 ·
Maintainers usually reply within 1 day