Hyea š
Using the sequential ordinal regression (ref. https://doi.org/10.1177/2515245918823199):
library(brms)
library(dplyr)
library(purrr)
dat <- data.frame(Y = ordered(1:4),
w = c(80, 114, 138, 143))
fit <- brm(Y | resp_weights(w) ~ 1,
family = sratio(),
data = dat,
backend = "cmdstanr")
# True parameters (in Odds Ratios):
map_dbl(1:3, ~ dat$w[.x] / sum(dat$w[-(1:.x)]))
#> [1] 0.2025316 0.4056940 0.9650350
# Recoverd parameters
parameters::model_parameters(fit, test = NULL) |>
mutate(across(c(2,3:4), exp))
#> Parameter | Median | 95% CI | Rhat | ESS
#> -------------------------------------------------------
#> Intercept[1] | 0.20 | [0.16, -1.36] | 1.000 | 3875.00
#> Intercept[2] | 0.41 | [0.32, -0.68] | 1.000 | 3687.00
#> Intercept[3] | 0.97 | [0.77, 0.21] | 0.999 | 4128.00