# Correlated outcomes with different data subsets

**URL:** <https://discourse.mc-stan.org/t/correlated-outcomes-with-different-data-subsets/27107>\
**Category:** brms\
**Tags:** specification\
**Created:** [April 10, 2022, 11:23pm UTC](https://discourse.mc-stan.org/t/correlated-outcomes-with-different-data-subsets/27107 "2022-04-10T23:23:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jsocolar](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jsocolar/32/2486_2.png) [@jsocolar](https://discourse.mc-stan.org/u/jsocolar)\
**Post date:** [April 11, 2022, 1:31am UTC](https://discourse.mc-stan.org/t/correlated-outcomes-with-different-data-subsets/27107/2 "2022-04-11T01:31:10Z")

</div>

Does this thread help?

> [@Multivariate formula with different number of observations](https://discourse.mc-stan.org/t/multivariate-formula-with-different-number-of-observations/16401):
>
> Hi, I would like to model two response variables (y1, y2) using brms multivariate syntax to (1) model each response with a different distribution family, and (2) model the random effects g as correlated. The number of obs for y1 and y2 differ. The idea is to have something like: bf\_1 \<- bf(y1 ~ 1 + (1|ID|g)) + normal() bf\_2 \<- bf(y2 ~ 1 + (1|ID|g)) + lognormal() According to the [brms multivariate vignette](https://paul-buerkner.github.io/brms/articles/brms_multivariate.html), it seems that we need the same number of observations for each component in the formu…

Note also that if the gold standard variable and the test outcomes are binary or categorical, then there are often good reasons to focus on sensitivity and specificity rather than overall predictive power in a regression (the latter will potentially be sensitive to the composition of the sample).

---

_[View the full topic](https://discourse.mc-stan.org/t/correlated-outcomes-with-different-data-subsets/27107)._
