Describe the brms summaries of `recover_exchangeable_covariance()` accurately

Open Beginner friendly
#177 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@sridhar007-ah is already working on this.

Since Nov 13, 2026.

  • #188 by @sridhar007-ah — open

Assessment

Difficulty
1/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

Read the help entry for recover_exchangeable_covariance() and compare it with the brms summary logic in R/model_exchangeable_covariance.R (lines 282–290). Update the return-value description to say that brms summaries of varcov and sdcor are separate and need not agree, and that medians are taken element by element.

Written by the indexing model from the issue text.

Description

documentation good first issue priority: low

For brms models with posterior = "mean" or "median", the function summarises varcov and sdcor separately, element by element. Two consequences are missing from the help:

  1. sdcor holds the mean (or median) of the SD and correlation draws. It is not the SD and correlation form of the returned varcov, and the two cannot be converted into each other. In a small fit during the review (20 dyads), the partner correlation was 0.57 in sdcor and 0.59 when computed from varcov.
  2. The median is taken element by element. The resulting matrix need not be a valid covariance matrix.

Both are small next to the posterior uncertainty. The help calls sdcor the SD and correlation representation of varcov, which is only exact for glmmTMB and for posterior = "draws".

Suggested fix and checks

  • Add one sentence to the return value: for brms summaries, varcov and sdcor are summarised separately and need not agree.
  • Say that the median is element-wise.
Dominant language
R
Stars
1
Forks
2
Avg merge
11h 4m
Merged PRs (30d)
42

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Pascal-Kueng/dyadMLM

All issues in Pascal-Kueng/dyadMLM

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.