Integrating emmeans with brms

FYI, what emmeans does is creates a grid of factor (and predictor) combinations, and for each node on the grid, the posterior MCMC sample of predictions at that node. Currently, the user can specify which parameter (in this case mu, sigma, or ndt. emmeans() may then further average selected ones of these together to obtain marginal means, back-transform them, etc.

What would be useful for a model like this is provisions to ensure that the grid involves all the predictors in all of the parts of the model; then for each node, the posterior sample of values of ndt + exp(mu.hat + 0.5*sigma.hat^2). I believe it wouldn’t be too hard to do this, and I could help with the needed additions to emm_basis.brms(). The code would be similar to existing code for prediction. It’d help to have some understanding more generally across models handled by brms and how manageable is that number. I suppose we have various zero-inflated, hurdle, and truncated cases.