public abstract class DemographicModel extends java.lang.Object implements Units, Parameterized, Report, java.lang.Cloneable, java.io.Serializable, Summarizable
Parameterized.Null, Parameterized.ParameterizedBase, Parameterized.ParameterizedUser, Parameterized.Utils
Modifier and Type | Field and Description |
---|---|
protected FormattedOutput |
fo |
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, SAMPLE, SHORT_UNIT_NAMES, UNIT_NAMES, UNKNOWN, YEARS
Constructor and Description |
---|
DemographicModel() |
Modifier and Type | Method and Description |
---|---|
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.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDefaultValue, getLowerLimit, getNumParameters, getParameter, getUpperLimit, setParameter, setParameterSE
getSummaryTypes, getSummaryValue
protected FormattedOutput fo
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.