Multiple Regression in Rstan with factors

MCMCpack::MCMCregress is using essentially the same tricks to pre-compute matrices of cross-products and stuff as rstanarm::stan_lm does. But NUTS is generally a better way to do MCMC than is Gibbs sampling and is always better than Metropolis-Hastings. If you compare MCMCpack::MCMClogit to either rstanarm::stan_glm or brms::brm with binomial link functions there is a big difference in the sampling efficiency.

1 Like