plot.prior: Plot Prior Distribution

Description Usage Arguments Examples

View source: R/plot_prior.R

Description

Plot the probability density function of a prior distribution.

Usage

1
2
## S3 method for class 'prior'
plot(x, from, to, ...)

Arguments

x

prior probability density function defined via prior.

from

lower boundary

to

upper boundary

...

further arguments passed to plot

Examples

1
2
3
4
5
6
p1 <- prior("t", c(location = 0, scale = 0.707, nu = 1), 0, 3)
plot(p1, 0, 2)

# define custom prior pdf up to a constant:
p2 <- prior("custom", function(x) x^.5, 0, .5)
plot(p2)

metaBMA documentation built on March 17, 2021, 9:06 a.m.