Skip to content

Point estimate plotted weirdly in mcmc_areas() #168

@jtimonen

Description

@jtimonen

kernel_densities

The point estimate (in dark blue) gets plotted like this, when I have multiple parameters to plot. Below is a code to reproduce the issue.

require(bayesplot)
set.seed(123)

K <- 2
X <- array(0,c(N,1,K))
for(k in 1:K){
  N <- 1000
  x <- rgamma(N, 1, 5)
  X[,1,k] <- x
}

dimnames(X)[[3]] <- as.list(paste("x", 1:K, sep="_"))
mcmc_areas(X, prob_outer=0.9, point_est = "median")

If I change median to mean, the height of the dark blue area is still off. If I change K to 1, it looks as it should. I am using version 1.6.0.

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