document how to get a custom summary from CmdStanMCMC sample via print function.
question came up on Discourse: https://discourse.mc-stan.org/t/how-to-change-default-quantiles-for-summary-statistics-of-cmdstan-as-cmdstan-fit/26046/4
The CmdStanR docs should document use of quantiles, also "mean", "median" and other basic stats. The implementation is kinda wierd, because you end up with print statements like this:
fit_hier$print('z', "mean", "median", ~quantile(.x, probs = c(0.1, 0.9)), max_rows=18)
where it's hard to tell what are the model variables and what are the formatting directives.
Yeah I'll add some more examples. I'll also look into improving the doc in posterior since it would be best to have most of the doc there so we don't have to duplicate.
Can I help resolve this? I already wrote some examples in #719
Would you like this to be documented in the print docs, in the Getting Started vignette or in a new vignette?
I think the print docs and a short example in the getting started vignette would be perfect. Thank you!
The original question is a bit tricky because stats::sd doesn't have a ... argument. This might be improved with a generic sd() in posterior which could capture the unused arguments.