View source: R/BASiCS_DiagPlot.R
BASiCS_DiagPlot | R Documentation |
Plot parameter values and effective sample size. See effectiveSize for more details on this diagnostic measure.
BASiCS_DiagPlot(
object,
Parameter = "mu",
Measure = c("ess", "geweke.diag", "rhat"),
x = NULL,
y = NULL,
LogX = isTRUE(x %in% c("mu", "delta")),
LogY = isTRUE(y %in% c("mu", "delta")),
Smooth = TRUE,
HLine = TRUE,
na.rm = TRUE
)
BASiCS_diagPlot(...)
object |
an object of class |
Parameter |
Name of the parameter to be plotted.
Default |
Measure |
Character scalar specifying the diagnostic measure to plot.
Current options are effective sample size, the Geweke diagnostic
criterion, and the |
x , y |
Optional MCMC parameter values to be plotted on the x or y axis, respectively. If neither is supplied, Parameter will be plotted on the x axis and effective sample size will be plotted on the y axis as a density plot. |
LogX , LogY |
A logical value indicating whether to use a log10 transformation for the x or y axis, respectively. |
Smooth |
A logical value indicating whether to use smoothing
(specifically hexagonal binning using |
HLine |
Numeric scalar or vector indicating threshold value(s) to be
displayed as a dashed line on the plot when |
na.rm |
Logical value indicating whether NA values should be removed before calculating effective sample size. |
... |
Unused. |
A ggplot object.
Alan O'Callaghan
BASiCS_Chain
# Built-in example chain
data(ChainSC)
# Point estimates versus effective sample size
BASiCS_DiagPlot(ChainSC, Parameter = "mu")
# Effective sample size as colour, mu as x, delta as y.
BASiCS_DiagPlot(ChainSC, x = "mu", y = "delta")
# Point estimates versus Geweke diagnostic
BASiCS_DiagPlot(ChainSC, Parameter = "mu", Measure = "geweke.diag")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.