I have `N` observations with count outcomes `y_i`, predictor vectors `x_i`, and optionally known positive offsets or exposures `mu0_i`, for `i = 1, ..., N`. I want to fit a negative binomial Bayesian additive regression tree model.

My model is:
`y_i ~ NegBinomial2(mu_i, kappa), for i = 1, ..., N,`
`mu_i = mu0_i f(x_i), for i = 1, ..., N,`
`Var(y_i | x_i) = mu_i (1 + mu_i / kappa), for i = 1, ..., N,`
`kappa ~ BetaPrime(a_kappa, b_kappa).`

The latent regression function is fit with log-linear BART, so `f(x_i) > 0`.

An equivalent generative representation is:
`tau_i ~ Gamma(kappa, kappa), for i = 1, ..., N,`
`y_i | tau_i ~ Poisson(mu0_i f(x_i) tau_i), for i = 1, ..., N.`

Here:
`y_i` is the observed count for observation i,
`x_i` is the predictor vector for observation i,
`mu0_i` is a known positive offset or exposure term for observation i, with `mu0_i = 1` when there is no offset,
`mu_i` is the conditional mean count for observation i,
`f(x_i)` is the positive multiplicative regression function at predictor value `x_i`,
`kappa` is the negative binomial dispersion parameter,
`tau_i` is the Gamma mixing variable in the Poisson-Gamma representation,
`BetaPrime(a_kappa, b_kappa)` denotes the beta-prime prior with density proportional to `kappa^{a_kappa - 1} (1 + kappa)^{-(a_kappa + b_kappa)}` for `kappa > 0`.

In the generalized BART implementation, the usual defaults are `ntrees = 100`, `a0 = 2.47`, `base = 0.95`, `power = 2`, and `kappa ~ BetaPrime(5, 3)`.
