ti: Thermodynamic integration

Description Usage Arguments Details Value Author(s) References Examples

View source: R/ti.R

Description

This function produces a thermodynamic integration estimate of the marginal likelihood given a set of log-likelihood values at different temperatures.

Usage

1
ti(x, actPlot = FALSE, temp = NULL)

Arguments

x

A data frame with the folloging columns: logL and invTemp, which contain the log-likelihood and inverse temperature values, respectively.

actPlot

If it is TRUE, the function plots the temperatures against the log-likelihood means at the different temperatures.

temp

It indicates the temperatures to be used in the analysis, for instance, c(1,3,K) considers the temperatures at those positions, where K is the number of temperatures. In this case, the temperatures must be sorted in an increasing order. Note that samples from the prior and posterior must be included in the process. "NULL" stands for all the temperatures in x.

Details

Power posterior methods, among them thermodynamic integration, rely on a set of samples from different transitional distributions, connecting the prior and the posterior distributions, which is defined by the power posterior density

p(θ) \propto L(x|θ)^{β} π(θ),

where θ is the parameter vector, 0 ≤ β ≤ 1 is the inverse temperature, x is the data, p(θ) is the power posterior density, L(x|θ) is the likelihood function, and π(θ) is the prior density.

ti uses the trapezoidal rule in the estimation (see more details in Lartillot and Philippe (2006)).

Value

It produces a thermodynamic integration estimate.

Author(s)

Patricio Maturana Russel [email protected]

References

Lartillot, N., and Philippe, H. 2006. Computing Bayes factors using Thermodynamic Integration. Systematic Biology 55(2), 195–207.

Examples

1
2
data(ligoVirgoSim)
ti(ligoVirgoSim, actPlot = TRUE, temp = NULL)

pmat747/powModSel documentation built on Dec. 7, 2018, 8 a.m.