Skip to content

Set bw in mcmc_dens_overlay #258

Closed
@lindeloev

Description

@lindeloev
Contributor

It would be great if mcmc_dens_overlay had a "bw" argument to set the bandwidth of the kernel used for computing the density. mcmc_dens_chains and mcmc_dens_chains_data already have this.

It looks like mcmc_dens_overlay uses the default "nrd0" in density which is very smooth. I have a density with truly abrupt changes which bw = "SJ" captures it much better. Compare mcmc_dens_overlay:
image

to plot(density(samples$cp_1, bw = "SJ")):

image

Activity

added a commit that references this issue on Feb 1, 2021
982a713
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @lindeloev

      Issue actions

        Set bw in mcmc_dens_overlay · Issue #258 · stan-dev/bayesplot