plot.pbayes | R Documentation |
Visualizes the results of Bayesian probability mapping for p-values by plotting the fitted uniform-beta mixture distribution alongside the histogram of the original p-values. This function provides a graphical representation of how well the mixture model fits the data and allows for the inspection of posterior probabilities associated with each p-value.
## S3 method for class 'pbayes'
plot(pb, hist_breaks = 70, linewidth = 1, brewer_pal = "Set2")
pb |
A 'pbayes' object containing the results from Bayesian probability mapping, including the fitted mixture model and original p-values. Must be of class 'pbayes'. |
hist_breaks |
Integer, the number of breaks (bins) to use for the histogram of p-values. Defaults to 70. |
linewidth |
Numeric, specifying the line width for the mixture model components. Defaults to 1. |
brewer_pal |
Character string, specifying the color palette from the RColorBrewer package to use for the different components of the mixture model. Defaults to "Set2". |
A ggplot object representing the fitted mixture model and the distribution of p-values. This object can be further modified using ggplot2 functions or printed to display the plot.
## Not run:
# Assuming you have a pbayes object `pb` from previous analysis
plot.pbayes(pb)
# Customizing the plot
plot.pbayes(pb, hist_breaks = 100, linewidth = 2, brewer_pal = "Dark2")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.