hobbs
High dimensiOnal Bayesian omniBus Sampler
An R package and probabilistic programming system for high-dimensional Bayesian data analysis.
hobbs lets model authors express computational structure directly: parameter-local posterior targets, exact deterministic cache updates, selectable scalar samplers, and optional numerical lookup caches.
The basic idea
A scalar proposal should only recompute what can actually change. In hobbs, a block declares the posterior terms affected by a parameter coordinate, while an attached cache / update pair can maintain deterministic state such as a linear predictor incrementally.
param beta(p) sampler=slice;
block beta(j) {
beta(j) ~ dnorm(0, 10);
llk();
} cache mu(n) {
for (i = 1:n) {
for (k = 1:p) {
mu(i) += beta(k) * x(i,k);
}
}
} update mu(n) {
for (i = 1:n) {
mu(i) += (proposal(beta(j)) - current(beta(j))) * x(i,j);
}
}
Start here
If you are new to the package, read the tutorial first. It walks through the programming model used in the paper: parameter declarations, reusable functions, local sampling blocks, deterministic caches, sampler choices, syntax rules, and run-time options.
For full worked models, see the random-intercept/random-slope GLMM and the 50,000-predictor sparse variable-selection model.
Validation against Stan and JAGS
The distribution test suite contains matched HOBBS, Stan, and JAGS versions of each distribution example. The distribution pages expose those model definitions side by side and include the complete R test files used to compare their posterior draws.