Skip to content

can't replicate vignette plots for mcmc_rhat and mcmc_neff #327

Closed
@adcascone

Description

@adcascone

Hello,

I'm trying to recreate the plots in the "Visual MCMC diagnostics using the bayesplot package" - specifically those under the 'mcmc_rhat, mcmc_rhat_hist' section and the 'mcmc_neff' section.

When I run this code in the vignette to reproduce the mcmc_rhat() output:

color_scheme_set("brightblue") # see help("color_scheme_set")
mcmc_rhat(rhats)

The resulting plot is missing the line/point in the legend for the first two bins:
image

I see the same behavior in the subsequent plot, when y-axis text is added to the plot.

And when I run this code in the vignette to reproduce the mcmc_neff() output:

mcmc_neff(ratios_cp, size = 2)

The resulting plot is again missing a line/point in the legend:

image

Is this behavior expected? I noticed there are no data points in the bins that are missing from the legend so the plot's interpretations are not technically impacted. That said, it seems odd to have an incomplete legend.

-- Here are the relevant details of my R session --

> sessionInfo()
R version 4.4.1 (2024-06-14)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.4 LTS

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] bayesplot_1.11.1   shiny_1.8.1.1

--

Thanks for the guidance!
Arianna C.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions