I would like to express a generic version of a negative binomial model as an equation. The model run in BRMS is as follows:

```
modNB <- brm(y|weights(weightObs) ~ x1 + x2 + x3 + (1 | cluster), data = dat, prior = c(set_prior("normal(0.5, 1)", class = "b")), family = negbinomial())
```

My attempt at then representing this as an equation is then like so:

My questions are then:

- are the weights added to the vector of independent variables and their coefficients as: -wx^{T}_{c}\beta (as well as wy_{c})?
- how do I represent random effects on the intercept? Above, I expressed it as an estimated parameter rate parameter (1/f_{c0}) with a normal distribution mu and sigma squared.

The equation can be rendered using this website: https://www.latex4technics.com/

**Edit by @Max_Mantei to properly display \LaTeX.**