-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
mcmc_areas() fixes #169
Merged
mcmc_areas() fixes #169
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jgabry
approved these changes
Oct 23, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tjmahr These changes are great! And I love the examples you added to the mcmc_areas
doc where the titles/subtitles of the plots in the examples clearly explain the difference between the area_method
options. Thanks!
Great! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From the NEWS.md
mcmc_areas()
gains an argument
area_method
which controls how to draw the densitycurves. The default
"equal area"
constrains the heights so that the curveshave the same area. As a result, a narrow interval will appear as a spike
of density, while a wide, uncertain interval is spread thin over the x axis.
Alternatively
"equal height"
will set the maximum height on each curve tothe same value. This works well when the intervals are about the same width.
Otherwise, that wide, uncertain interval will dominate the visual space
compared to a narrow, less uncertain interval. A compromise between the two is
"scaled height"
which scales the curves from"equal height"
usingheight * sqrt(height)
. (support for equal-height curves mcmc_areas() #163, mcmc_areas() fixes #169)mcmc_areas()
correctly plots density curves where the point estimatedoes not include the highest point of the density curve.
(Point estimate plotted weirdly in mcmc_areas() #168, mcmc_areas() fixes #169, @jtimonen)
mcmc_areas_ridges()
draws the vertical line at x = 0 over the curves sothat it is always visible.
mcmc_intervals()
andmcmc_areas()
raise a warning ifprob_outer
is everless than
prob
. It sorts these two values into the correct order. (prob_outer ignored in mcmc_areas_ridges() #138)Not in NEWS.md
Here are examples of the three plotting styles.