How can I get a negative binomial prior in brms?
Negative binomial distribution is a discrete distribution, so it would make sense only for some discrete parameter, and parameters in Stan have to be continuous.
What about factor variables?
What about them? You can have priors for regression coefficients of factor variables, which are continuous as @jsocolar explains here: How to do empirical Bayes on factor variables? - #3 by jsocolar. But you can’t have negative binomial prior because that is not continuous. Formulas like ´y ~ age + gender` are ambiguous because they do not show the parameters but whatever model you have in brms, all parameters are going to be continuous. If you really want to have a prior for discrete/categorical unknowns and perform inference on them then it is not going to be as straightforward as just fitting a bmrs model: 7 Latent Discrete Parameters | Stan User’s Guide