Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use random effects as predictors in formula via 're' terms #1687

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

paul-buerkner
Copy link
Owner

No description provided.

@mvuorre
Copy link
Contributor

mvuorre commented Nov 19, 2024

(Apologies if this is not the right place to comment/ask, happy to move elsewhere.)

This is a great feature, and its syntax (especially re(..., resp = "", nlpar = "")) suggests to me that one can now share parameters across outcomes in multivariate models. One of the tests1 already does this by predicting x from by-gr random intercepts of y.

  1. Since this sharing is now possible for the "random" effects, can it also be somehow done for the "fixed" effects?
  2. Moreover, how would one go about extending the example in that test1 to a nonlinear multivariate model? (That is, referring to the re() terms by name.) If I understand correctly, the syntax allows for it but it is not clear how one would have to name the parameters to accomplish it.
  3. Most concretely, it would be awesome if this came with more examples (and/or was incorporated into a vignette).

Thanks!

Footnotes

  1. https://github.com/paul-buerkner/brms/blob/b5f83cbde65c0503580645c3cd172a39da07dc8d/tests/testthat/tests.stancode.R#L1141 2

@paul-buerkner
Copy link
Owner Author

  1. This will only be possible with brms 3.0

  2. and 3. This PR is part of a WIP paper of ours. We will post more examples on this when the paper is out.

@mvuorre
Copy link
Contributor

mvuorre commented Nov 20, 2024

Great, thanks a bunch for clarifying! Look forward to the paper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants