pal.tree
Class MutationRateModelTree

java.lang.Object
  |
  +--pal.tree.ParameterizedTree
        |
        +--pal.tree.MutationRateModelTree
All Implemented Interfaces:
Parameterized, java.io.Serializable, Tree, Units

public class MutationRateModelTree
extends ParameterizedTree

Provides parameter interface to any clock-like tree with serially sampled tips (parameters are the minimal node height differences at each internal node). Any mutation rate model can be used.

See Also:
MutationRateModel, Serialized Form

Fields inherited from interface pal.misc.Units
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, YEARS
 
Constructor Summary
MutationRateModelTree(Tree t, TimeOrderCharacterData tocd, MutationRateModel model)
          take any tree and afford it with an interface suitable for a clock-like tree (parameters are the minimal node height differences at each internal node).
 
Method Summary
 double getDefaultValue(int n)
          get default value of parameter
 double getLnL()
           
 double getLowerLimit(int n)
          Returns lower limit of parameter estimate.
 MutationRateModel getMutationRateModel()
          returns mu
 int getNumParameters()
          get number of parameters
 double getParameter(int n)
          get model parameter
 double getUpperLimit(int n)
          get upper parameter limit
protected  void heights2parameters()
           
protected  void parameters2Heights()
           
 void setLnL(double lnL)
           
 void setParameter(double param, int n)
          set model parameter
 void setParameterSE(double paramSE, int n)
          set standard errors for model parameter
 
Methods inherited from class pal.tree.ParameterizedTree
createNodeList, getAttribute, getBaseTree, getExternalNode, getExternalNodeCount, getInternalNode, getInternalNodeCount, getRoot, getUnits, setAttribute, setBaseTree, setRoot, setUnits, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MutationRateModelTree

public MutationRateModelTree(Tree t,
                             TimeOrderCharacterData tocd,
                             MutationRateModel model)
                      throws java.lang.RuntimeException
take any tree and afford it with an interface suitable for a clock-like tree (parameters are the minimal node height differences at each internal node).

This parameterisation of a clock-tree, ensuring that all parameters are independent of each other is due to Andrew Rambaut (personal communication).

Method Detail

getNumParameters

public int getNumParameters()
Description copied from interface: Parameterized
get number of parameters
Following copied from interface: pal.misc.Parameterized
Returns:
number of parameters

setParameter

public void setParameter(double param,
                         int n)
Description copied from interface: Parameterized
set model parameter
Following copied from interface: pal.misc.Parameterized
Parameters:
param - parameter value
n - parameter number

getParameter

public double getParameter(int n)
Description copied from interface: Parameterized
get model parameter
Following copied from interface: pal.misc.Parameterized
Parameters:
n - parameter number
Returns:
parameter value

getLowerLimit

public double getLowerLimit(int n)
Returns lower limit of parameter estimate.
Following copied from interface: pal.misc.Parameterized
Parameters:
n - parameter number
Returns:
lower bound

getDefaultValue

public double getDefaultValue(int n)
Description copied from interface: Parameterized
get default value of parameter
Following copied from interface: pal.misc.Parameterized
Parameters:
n - parameter number
Returns:
default value

setParameterSE

public void setParameterSE(double paramSE,
                           int n)
Description copied from interface: Parameterized
set standard errors for model parameter
Following copied from interface: pal.misc.Parameterized
Parameters:
paramSE - standard error of parameter value
n - parameter number

getUpperLimit

public double getUpperLimit(int n)
Description copied from interface: Parameterized
get upper parameter limit
Following copied from interface: pal.misc.Parameterized
Parameters:
n - parameter number
Returns:
upper bound

getMutationRateModel

public MutationRateModel getMutationRateModel()
returns mu

parameters2Heights

protected void parameters2Heights()

heights2parameters

protected void heights2parameters()

setLnL

public void setLnL(double lnL)

getLnL

public double getLnL()