mcmcPOUMMGivenPriorTreeVTips: MCMC-sampling from a posterior distribution of a P(OU)MM...

Description Usage Arguments Details Value

View source: R/fitPOUMM.R

Description

MCMC-sampling from a posterior distribution of a P(OU)MM model given tree, values at the tips and a prior distribution

Usage

1
2
3
4
mcmcPOUMMGivenPriorTreeVTips(loglik, fitML = NULL, parMapping,
  parInitMCMC, parPriorMCMC, parScaleMCMC, nSamplesMCMC, nAdaptMCMC,
  thinMCMC, accRateMCMC, gammaMCMC, nChainsMCMC, samplePriorMCMC,
  pruneInfo, ..., verbose = FALSE, parallelMCMC = FALSE)

Arguments

loglik

a log-likelihood function.

fitML

an object returned by the maxLikPOUMMGivenTreeVTips

parMapping

a function(numeric-vector) transforming a sampled vector on the scale of the parameters alpha, theta, sigma, sigmae and g0.

parInitMCMC

a function(chainNumber) returning the starting point of the MCMC as a vector.

parPriorMCMC

a function(numeric-vector) returning the log-prior of the supplied vector

parScaleMCMC

numeric matrix indicating the initial jump-distribution matrix

nSamplesMCMC

integer indicating how many iterations should the mcmc-chain contain

nAdaptMCMC

integer indicating how many initial iterations should be used for adaptation of the jump-distribution matrix

thinMCMC

integer indicating the thinning interval of the mcmc-chain

accRateMCMC

(MCMC) numeric between 0 and 1 indicating the target acceptance rate Passed on to adaptMCMC::MCMC.

gammaMCMC

(MCMC) controls the speed of adaption. Should be in the interval (0.5,1]. A lower gammaMCMC leads to faster adaption. Passed on to adaptMCMC::MCMC.

nChainsMCMC

integer indicating the number of chains to run. Defaults to 1.

samplePriorMCMC

logical indicating if only the prior distribution should be sampled. This can be useful to compare with mcmc-runs for an overlap between prior and posterior distributions.

pruneInfo

a list-object returned from the pruneTree(tree, z) function.

...

Additional arguments. Currently not used except for the following: If ... includes debug = TRUE, some debug messages will be written also outside of the call to loglik.

verbose

Logical indicating if some informal messages should be written during run. This parameter is passed to loglik.

parallelMCMC

Logical indicating if chains should be run in parallel.

Details

Currently, this function calls the MCMC function from the adaptMCMC package.

Value

a list of coda objects


POUMM documentation built on Nov. 16, 2018, 1:17 a.m.