statalign.base.mcmc
Class CoreMcmcModule

java.lang.Object
  extended by statalign.mcmc.McmcModule
      extended by statalign.base.mcmc.CoreMcmcModule

public class CoreMcmcModule
extends McmcModule

curLogLike for this McmcModule includes the contributions from the ModelExtensions. The core McmcMoves need to call functions in modelExtMan before and after execution, and also in order to update the likelihood contribution from all the ModelExtensions.

Author:
herman

Field Summary
 
Fields inherited from class statalign.mcmc.McmcModule
curLogLike, printExtraInfo
 
Constructor Summary
CoreMcmcModule(Mcmc mc, ModelExtManager m)
           
 
Method Summary
 ModelExtManager getModelExtMan()
           
 double logLikeFactor(Tree tree)
          This should return the log of the model's contribution to the likelihood, it will be added on to the log-likelihood of the current point in the MCMC state space.
 boolean proposeParamChange(Tree tree)
           
 double totalLogPrior(Tree tree)
           
 
Methods inherited from class statalign.mcmc.McmcModule
addMcmcMove, addMcmcMove, afterFirstHalfBurnin, afterSampling, beforeSampling, getLogLike, getMcmcInfo, getMcmcMove, getMcmcMoves, getParamChangeWeight, incrementWeights, isFirstHalfBurnin, isParamChangeAccepted, logPrior, modifyProposalWidths, setAllMovesNotProposed, setLogLike, setMcmc, setWeight, zeroAllMoveCounts
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoreMcmcModule

public CoreMcmcModule(Mcmc mc,
                      ModelExtManager m)
Method Detail

getModelExtMan

public ModelExtManager getModelExtMan()

totalLogPrior

public double totalLogPrior(Tree tree)

logLikeFactor

public double logLikeFactor(Tree tree)
Description copied from class: McmcModule
This should return the log of the model's contribution to the likelihood, it will be added on to the log-likelihood of the current point in the MCMC state space. Normally it will be called once at the initialisation of the MCMC process and from then on once in each MCMC step, when proposing any change. In debug mode, will be called more often (including after proposed changes) to ensure consistency.

Specified by:
logLikeFactor in class McmcModule
Parameters:
tree - current tree
Returns:
log of model extension likelihood, conditional on current tree, alignment and params

proposeParamChange

public boolean proposeParamChange(Tree tree)
Overrides:
proposeParamChange in class McmcModule