pal.eval
Class DemographicValue

java.lang.Object
  extended bypal.eval.DemographicValue
All Implemented Interfaces:
MultivariateFunction

public class DemographicValue
extends java.lang.Object
implements MultivariateFunction

estimates demographic parameters by maximising the coalescent prior for a tree with given branch lengths.


Field Summary
protected  CoalescentIntervals intervals
           
 double logL
          Log-Likelihood
protected  DemographicModel model
           
 
Constructor Summary
DemographicValue()
           
 
Method Summary
 double compute()
          compute log-likelihood for current model return negative log-likelihood
protected  void computeLogLikelihood()
           
 double evaluate(double[] params)
          compute function value
 CoalescentIntervals getCoalescentIntervals()
          Returns the coalescent tree of this likelihood value.
 DemographicModel getDemographicModel()
          Returns the demographic model of this likelihood value
 double getLowerBound(int n)
          get lower bound of argument n
 int getNumArguments()
          get number of arguments
 OrthogonalHints getOrthogonalHints()
           
 double getUpperBound(int n)
          get upper bound of argument n
 double optimize()
          optimize log-likelihood using default optimizer return minimum negative log-likelihood
 double optimize(MultivariateMinimum givenMvm)
          optimize log-likelihood value and compute corresponding SEs given an optimizer
 void setCoalescentIntervals(CoalescentIntervals ci)
          define coalescent tree.
 void setDemographicModel(DemographicModel m)
          define model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logL

public double logL
Log-Likelihood


intervals

protected CoalescentIntervals intervals

model

protected DemographicModel model
Constructor Detail

DemographicValue

public DemographicValue()
Method Detail

setDemographicModel

public void setDemographicModel(DemographicModel m)
define model

Parameters:
m - model of demographic

getDemographicModel

public DemographicModel getDemographicModel()
Returns the demographic model of this likelihood value


getCoalescentIntervals

public CoalescentIntervals getCoalescentIntervals()
Returns the coalescent tree of this likelihood value.


setCoalescentIntervals

public void setCoalescentIntervals(CoalescentIntervals ci)
define coalescent tree.


compute

public double compute()
compute log-likelihood for current model return negative log-likelihood


optimize

public double optimize()
optimize log-likelihood using default optimizer return minimum negative log-likelihood


optimize

public double optimize(MultivariateMinimum givenMvm)
optimize log-likelihood value and compute corresponding SEs given an optimizer

Returns:
minimimum negative log-likelihood value

evaluate

public double evaluate(double[] params)
Description copied from interface: MultivariateFunction
compute function value

Specified by:
evaluate in interface MultivariateFunction
Parameters:
params - function argument (vector)
Returns:
function value

getNumArguments

public int getNumArguments()
Description copied from interface: MultivariateFunction
get number of arguments

Specified by:
getNumArguments in interface MultivariateFunction
Returns:
number of arguments

getLowerBound

public double getLowerBound(int n)
Description copied from interface: MultivariateFunction
get lower bound of argument n

Specified by:
getLowerBound in interface MultivariateFunction
Parameters:
n - argument number
Returns:
lower bound

getUpperBound

public double getUpperBound(int n)
Description copied from interface: MultivariateFunction
get upper bound of argument n

Specified by:
getUpperBound in interface MultivariateFunction
Parameters:
n - argument number
Returns:
upper bound

computeLogLikelihood

protected void computeLogLikelihood()

getOrthogonalHints

public OrthogonalHints getOrthogonalHints()
Specified by:
getOrthogonalHints in interface MultivariateFunction
Returns:
null