plot_hp: plot Hyper-prior function

Description Usage Arguments Details Author(s) Examples

View source: R/plot_hp.R

Description

This function plots a hyper-prior density function. Currently supported density function are Uniform, Gamma, Normal, Loggamma and Lognormal. The resulting function is used during MCMC mcmc_bite to estimate parameters of priors.

Usage

1
2
plot_hp(hpf, col = c("#bfdbf7", "#f49e4c"), border = c("#2e86ab",
  "#a31621"), bty = "n", ...)

Arguments

hpf

name of a density function. Supported density functions are: Uniform, Gamma and Normal

col

color of the density area. Can be of size 2 (hpriors for the means, hpriors for the logvars) if a jive object is plotted

border

color of the density curve. Can be of size 2 (hpriors for the means, hpriors for the logvars) if a jive object is plotted

bty, ...

additional parameters that can be passed to a density function and par

Details

There are three currently implemented density function: Uniform, Gamma and Normal. Each of these densities requires two input parameters and hp.pars must be a vector of two values and cannot be left empty.

Author(s)

Theo Gaboriau

Examples

1
2
3
4
5
6
7
8
9
 ## Load test data
 data(Anolis_traits)
 data(Anolis_tree)
   
 my.hp <- hpfun(hpf="Uniform", hp.pars=c(1,2))
 plot_hp(my.hp)
 
 my.jive <- make_jive(Anolis_tree, Anolis_traits[,-3], model.priors = list(mean="BM", logvar="OU"))
 plot_hp(my.jive, cex.main = .8)

bite documentation built on April 22, 2020, 5:09 p.m.

Related to plot_hp in bite...