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

stat_slab: What does density = "bounded" assume behind the scenes? #235

Open
isabellaghement opened this issue Jun 20, 2024 · 0 comments
Open

Comments

@isabellaghement
Copy link

Hey Matthew,

I miss you on Twitter! 💗 Hope all is well with you. Reaching out here with a question.

On the ggdist website, at https://mjskay.github.io/ggdist/articles/slabinterval.html, there is an example at the very bottom which was inspired by @bwiernik:

image

The densities in this example are produced with the function stat_slab(). By default, this function uses the option density = "bounded".

What does this option assume behind the scenes? Does it assume that the variable whose values are being plotted via a density function is bounded? Does it assume that the kernel function used to estimate the density is bounded?

The reason I ask this is that, in my application of this example "as is", for some variables the density function in one of the groups being plotted looked truncated at the right even though the variable being plotted was continuous. Something like this:

image

I would much appreciate a clarification and also a comment on when and why we would like to use the opposite option, density = "unbounded", in practice?

For other users, the requested clarification may be helpful to add somewhere in the documentation for the functions density_bounded() and density_unbounded() so that they can choose correctly between these two options based on the nature of their data?

Thanks very much!

Isabella

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