I am using cmdstan in R to draw sample from a posterior distribution. Once the sampling is completed, I would like to use some of the output of cmdstan_summary() for further process (i.e. to compute the MCSE to StdDev ratio). However, I cannot isolate the “table” of the cmdstan_summary(). Is there any was I could save only that as a matrix or any?

Thanks, avatar! Unfortunately, this is not what I am looking for. The summary()/print() extensions only return some summary statistics, while the cmdstan_summary() offers more information - specifically I wish to isolate the MCSE.

Ideally, I am interested to obtain the output of cmdstan_summary() in a matrix form, where rows are the variables, and columns are the statistics. This would be useful to use these for further analysis, or pass them into tables for presentation, etc.

Adding, that those who are happy with the default tibble output (which is a data.frame with improved behaviour) can drop the data.frame part (but I understand if you prefer base data.frame)