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

make.prior

Simple Prior Functions


Description

Functions for generating prior functions for use with mcmc, etc.

Usage

make.prior.exponential(r)
make.prior.uniform(lower, upper, log=TRUE)

Arguments

r

Scalar or vector of rate parameters

lower

Lower bound of the parameter

upper

Upper bound of the parameter

log

Logical: should the prior be on a log basis?

Details

The exponential prior probability distribution has probability density

sum(r[i]*exp(-r[i]*x[i]))

where the i denotes the ith parameter. If r is a scalar, then the same rate is used for all parameters.

These functions each return a function that may be used as the prior argument to mcmc().

Author(s)

Richard G. FitzJohn


diversitree

Comparative 'Phylogenetic' Analyses of Diversification

v0.9-15
GPL (>= 2)
Authors
Richard G. FitzJohn [aut, cre], Emma Goldberg [aut], Karen Magnuson-Ford [aut], Roger Sidje [aut]
Initial release

We don't support your browser anymore

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