Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add split-chain option to rank plots. #333

Open
sims1253 opened this issue Dec 16, 2024 · 0 comments
Open

Add split-chain option to rank plots. #333

sims1253 opened this issue Dec 16, 2024 · 0 comments

Comments

@sims1253
Copy link
Contributor

sims1253 commented Dec 16, 2024

This is again relevant to https://discourse.mc-stan.org/t/rank-plots-dont-save-you-from-symmetric-non-stationary-chains/37624/4

I suppose this would be relevant for all rank-based plots?

Using this to make my own version of split chains makes the problems super obvious:

n = 1000
chain1 <- -2 + 0.003 * 1:n + arima.sim(list(ar = 0.7), n = n, sd = 0.5)
chain2 <- 1 + -0.003 * 1:n + arima.sim(list(ar = 0.7), n = n, sd = 0.5)

# Split chains into first and second half
midpoint <- n/2
chains <- as_draws_array(list(
  chain1_first = list(theta = chain1[1:midpoint]),
  chain1_second = list(theta = chain1[(midpoint+1):n]),
  chain2_first = list(theta = chain2[1:midpoint]),
  chain2_second = list(theta = chain2[(midpoint+1):n])
))

mcmc_rank_overlay(chains, )
mcmc_rank_ecdf(chains, plot_diff = TRUE)

image
image

sims1253 added a commit to sims1253/bayesplot that referenced this issue Dec 16, 2024
sims1253 added a commit to sims1253/bayesplot that referenced this issue Dec 16, 2024
sims1253 added a commit to sims1253/bayesplot that referenced this issue Dec 16, 2024
sims1253 added a commit to sims1253/bayesplot that referenced this issue Dec 16, 2024
sims1253 added a commit to sims1253/bayesplot that referenced this issue Dec 16, 2024
@sims1253 sims1253 changed the title Add split-chain option to trace and rank plots. Add split-chain option to rank plots. Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant