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

n_obs(..., disaggregate = TRUE) for brms models with trials() or weights() #581

Open
bwiernik opened this issue Jun 9, 2022 · 0 comments
Labels
Enhancement 💥 Implemented features can be improved or revised

Comments

@bwiernik
Copy link
Contributor

bwiernik commented Jun 9, 2022

For binomial and multinomial trials with a | trials() or | weights() argument, there should be an option to get disaggregate the data and return the total number of trials, like we do with 'glm' models.

library(brms)
m <- brm(incidence | trials(size) ~ period, data = lme4::cbpp, family = "binomial")
n_obs(m)
n_obs(m, disaggregate = TRUE)
@bwiernik bwiernik changed the title n_obs(..., disaggregate = TRUE) for brms models with trials() n_obs(..., disaggregate = TRUE) for brms models with trials() or weights() Jun 12, 2022
@strengejacke strengejacke added the Enhancement 💥 Implemented features can be improved or revised label Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 💥 Implemented features can be improved or revised
Projects
None yet
Development

No branches or pull requests

2 participants