|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpal.coalescent.DemographicModel
public abstract class DemographicModel
This abstract class contains methods that are of general use for modelling coalescent intervals given a demographic model. Parts of this class were derived from C++ code provided by Oliver Pybus.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface pal.misc.Parameterized |
---|
Parameterized.Null, Parameterized.ParameterizedBase, Parameterized.ParameterizedUser, Parameterized.Utils |
Field Summary | |
---|---|
protected FormattedOutput |
fo
|
Fields inherited from interface pal.misc.Units |
---|
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, SAMPLE, SHORT_UNIT_NAMES, UNIT_NAMES, UNKNOWN, YEARS |
Constructor Summary | |
---|---|
DemographicModel()
|
Method Summary | |
---|---|
abstract java.lang.Object |
clone()
|
double |
computeLogLikelihood(double width,
double timeOfPrevCoal,
int numLineages)
Returns the likelihood of a given *coalescent* interval |
double |
computeLogLikelihood(double width,
double timeOfPrevCoal,
int numLineages,
int type)
Returns the likelihood of a given interval,coalescent or otherwise. |
abstract double |
getDemographic(double t)
Gets the value of the demographic function N(t) at time t. |
double |
getIntegral(double start,
double finish)
Calculates the integral 1/N(x) dx between start and finish. |
abstract double |
getIntensity(double t)
Returns value of demographic intensity function at time t (= integral 1/N(x) dx from 0 to t). |
abstract double |
getInverseIntensity(double x)
Returns value of inverse demographic intensity function (returns time, needed for simulation of coalescent intervals). |
double |
getLogL()
returns log-likelihood. |
double |
getSimulatedInterval(int numLin,
double timeOfLastCoal)
Returns an random interval size selected from the Kingman prior of the demographic model. |
int |
getUnits()
returns units of measurement. |
void |
setLogL(double l)
sets log likelihood |
void |
setUnits(int u)
sets units of measurement. |
void |
testConsistency(int steps,
double maxTime)
This function tests the consistency of the getIntensity and getInverseIntensity methods of this demographic model. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface pal.misc.Parameterized |
---|
getDefaultValue, getLowerLimit, getNumParameters, getParameter, getUpperLimit, setParameter, setParameterSE |
Methods inherited from interface pal.misc.Report |
---|
report |
Methods inherited from interface pal.misc.Summarizable |
---|
getSummaryTypes, getSummaryValue |
Field Detail |
---|
protected FormattedOutput fo
Constructor Detail |
---|
public DemographicModel()
Method Detail |
---|
public abstract java.lang.Object clone()
clone
in class java.lang.Object
public abstract double getDemographic(double t)
public abstract double getIntensity(double t)
public abstract double getInverseIntensity(double x)
public double getSimulatedInterval(int numLin, double timeOfLastCoal)
public double getIntegral(double start, double finish)
public double computeLogLikelihood(double width, double timeOfPrevCoal, int numLineages)
public double computeLogLikelihood(double width, double timeOfPrevCoal, int numLineages, int type)
public void setUnits(int u)
u
- unitspublic int getUnits()
public void setLogL(double l)
l
- log-likelihoodpublic double getLogL()
public void testConsistency(int steps, double maxTime)
model
- the demographic model to test.steps
- the number of steps between 0.0 and maxTime to test.maxTime
- the maximum time to test.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |