Add title to rstan pairs.stanfit() plot


Sorry for the trivial question. How do I add a title to a pairs.stanfit() plot in rstan? main=“title” doesn’t seem to work.



I think the problem is that RStan is not expanding the ... when passing the call on pairs:

We can fix this. Until then you can probably get your own version of pairs.stanfit working by copying the code and just changing that one line. I haven’t tried it so maybe that errors for some reason, but I’ll open an issue on GitHub for actually fixing it in the next release.


Totally welcome question given that the standard way to do it wasn’t working for you and we don’t tell you another option anywhere since we didn’t know. (If you hadn’t even tried it before asking that would be somewhat annoying!)


Thanks, that worked. I had to use rstan::extract in the function to get the extract.stanfit method.


Glad that worked! Here’s the GitHub issue: