# Version of Rhat when printing stanfit object

**URL:** <https://discourse.mc-stan.org/t/version-of-rhat-when-printing-stanfit-object/33344>\
**Category:** General\
**Created:** [November 15, 2023, 5:45pm UTC](https://discourse.mc-stan.org/t/version-of-rhat-when-printing-stanfit-object/33344 "2023-11-15T17:45:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phcooney](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/phcooney/32/13992_2.png) [@phcooney](https://discourse.mc-stan.org/u/phcooney)\
**Post date:** [November 15, 2023, 5:45pm UTC](https://discourse.mc-stan.org/t/version-of-rhat-when-printing-stanfit-object/33344/1 "2023-11-15T17:45:07Z")

</div>

Hi,  
I want to evaluate Rhat for my stanfit using the improved version (reference below). I know that the Rhat is presented when I print the stanfit object, however, I want to know is this the improved version of Rhat?

If not, is there an easy way to calculate it for all of my parameters (i.e. a summary function) rather than having to extract all parameters combine into a matrix and then use rstan::Rhat?

Many thanks,  
Philip

[Convergence and efficiency diagnostics for Markov Chains — Rhat • rstan (mc-stan.org)](https://mc-stan.org/rstan/reference/Rhat.html)

---

<div class="post-metadata">

**Author:** ![ahartikainen](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/ahartikainen/32/321_2.png) [@ahartikainen](https://discourse.mc-stan.org/u/ahartikainen)\
**Post date:** [November 15, 2023, 7:54pm UTC](https://discourse.mc-stan.org/t/version-of-rhat-when-printing-stanfit-object/33344/2 "2023-11-15T19:54:06Z")

</div>

Hi, have you tried posterior package?

> **[Tools for Working with Posterior Distributions](https://mc-stan.org/posterior/)**
>
> Provides useful tools for both users and developers of packages 
> for fitting Bayesian models or working with output from Bayesian models. 
> The primary goals of the package are to: 
> (a) Efficiently convert between many different useful formats...

---

<div class="post-metadata">

**Author:** ![phcooney](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/phcooney/32/13992_2.png) [@phcooney](https://discourse.mc-stan.org/u/phcooney)\
**Post date:** [November 18, 2023, 4:28pm UTC](https://discourse.mc-stan.org/t/version-of-rhat-when-printing-stanfit-object/33344/3 "2023-11-18T16:28:29Z")

</div>

Thanks very much for this.
