# ss: Stepping-stone sampling In pmat747/powModSel: Power Posterior Methods for model selection

## Description

This function produces a stepping-stone sampling estimate of the marginal likelihood given a set of log-likelihood values at different temperatures. It can also be used to produce a generalised stepping-stone sampling estimate (see details below).

## Usage

 `1` ```ss(x, temp = NULL) ```

## Arguments

 `x` A data frame with the folloging columns: `logL` and `invTemp`, which contain the log-likelihood and inverse temperature values, respectively. The temperatures must be sorted in an increasing order. `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. Note that samples from the prior and posterior must be included in the process, even though the latter are not used by the algorithm. "NULL" stands for all the temperatures in `x`.

## Details

Power posterior methods, among them stepping-stone sampling, 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. See more details about the stepping-stone sampling algorithm in Xie et al. (2011).

`ss` can be also used to produce a generalised stepping-stone sampling estimate. In this case, the power posterior density defines a path between a reference distribution g and the posterior and is given by

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

where 0 ≤ β ≤ 1 is the inverse temperature. The reference distribution needs to be a reasonable approximation of the posterior. See more details about the generalised stepping-stone sampling algorithm in Fan et al. (2011).

## Value

It produces a stepping-stone sampling estimate.

## Author(s)

Patricio Maturana Russel [email protected]

## References

Fan, Y., Wu, R., Chen, M.-H., Kuo, L., Lewis, P. O., 2011. Choosing among partition models in Bayesian phylogenetics. Molecular Biology and Evolution 28(1), 523–532.

Xie, W., Lewis, P. O., Fan, Y., Kuo, L., Chen, M.-H., 2011. Improving marginal likelihood estimation for Bayesian phylogenetic model selection. Systematic Biology 60(2), 150–160.

## Examples

 ```1 2``` ```data(ligoVirgoSim) ss(ligoVirgoSim, temp = NULL) ```

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