plot.PPH: Plot of prior, likelihood, and posterior distributions

Description Usage Arguments Details Value See Also Examples

View source: R/plot.PPH.R

Description

Plots the prior, likelihood, and posterior distribution from a single study.

Usage

1
2
3
## S3 method for class 'PPH'
plot(x, range = NULL, n = 200, leg.loc = "topleft",
  xlab = "Effect size", ylab = "", ...)

Arguments

x

A PPH object created by the pph() function.

range

A numeric vector of length two that sets the range of the x-axis. Values are passed to xlim. Sensible default values are used when range = NULL.

n

An integer that specifies the number of x-values to use when plotting the distributions.

leg.loc

Location of the legend; default is top left. See the legend() help pages for all the options. If leg.loc = NULL the legend is not plotted.

xlab, ylab

Text for the x and y axes labels.

...

Other options passed to plot().

Details

Plots the prior, likelihood (data), and posterior distribution calculated from the pph() function for a single study.

Value

Plot of distributions.

See Also

pph

Examples

1
2
x <- pph(beta = 5.005, se.beta = 2.05)
plot(x)

stanlazic/BayesCombo documentation built on May 30, 2019, 9:41 a.m.