Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.PostF

Plot Posterior Density of PostF


Description

Computes highest posterior density and posterior mean and median as vertical lines, and plots these on the density function. You can transform the posterior draws while plotting.

Usage

## S3 method for class 'PostF'
plot(
  x,
  ...,
  cint = 0.95,
  label = NULL,
  type = c("linetype", "facet"),
  ltitle = ""
)

Arguments

x

result of running a function created by PostF

...

other results created by such functions

cint

interval probability

label

x-axis label if not the expression originally evaluated. When more than one result is plotted, label is a vector of character strings, one for each result.

type

when plotting more than one result specifies whether to make one plot distinguishing results by line type, or whether to make separate panels

ltitle

used of type='linetype' to specify name of legend for the line types

Value

ggplot2 object

Author(s)

Frank Harrell


rmsb

Bayesian Regression Modeling Strategies

v0.0.2
GPL (>= 3)
Authors
Frank Harrell [aut, cre] (<https://orcid.org/0000-0002-8271-5493>), Ben Goodrich [ctb] (contributed Stan code), Ben Bolker [ctb] (wrote original code that is folded into the pdensityContour function), Doug Bates [ctb] (write original code for highest posterior density interval that is folded into the HPDint function)
Initial release
2021-02-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.