I’m building a large model (millions of rows, tens of thousands of parameters) and calling the
summary method after the model is done fitting takes 30-60 minutes.
Technically, I’m doing this in cmdstanr, so I’ll show the simple code below, but I’ve had similar experiences in rstan.
mod <- cmdstan_model("...") fit <- mod$sample(data = ...) mod_summary <- fit$summary() # this takes surprisingly long
Is it the diagnostics that are taking a while? I can’t imagine the means and quantiles would take very long, even with the size of the model. Is there anything I can do to speed it up? Can I opt out of some of the features of the summary if (for now) I’m only interested in the posterior means/medians?