ss | R Documentation |
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).
ss(x, temp = NULL)
x |
A data frame with the folloging columns: |
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 |
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).
It produces a stepping-stone sampling estimate.
Patricio Maturana Russel p.russel@auckland.ac.nz
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.
## Not run: data(ligoVirgoSim) ss(ligoVirgoSim, temp = NULL) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.