Package pal.coalescent
Class ConstExpConst
java.lang.Object
pal.coalescent.DemographicModel
pal.coalescent.ConstantPopulation
pal.coalescent.ExponentialGrowth
pal.coalescent.ConstExpGrowth
pal.coalescent.ConstExpConst
- All Implemented Interfaces:
Serializable,Cloneable,Parameterized,Report,Summarizable,Units
This class models a population that grows exponentially from an
initial population size alpha N0 at time y to a size N0
at time x until the present-day.
(Parameters: N0=present-day population size; r=growth rate; alpha: ratio of
population sizes).
or
(Parameters: N0=present-day population size; r=growth rate; N1: pre-growth
ancestral population size).
This model is nested with the exponential-growth model (alpha -> 0 and tx -> 0).
- Version:
- $Id: ConstExpConst.java,v 1.2 2002/02/16 00:51:43 alexi Exp $
- Author:
- Alexei Drummond, Andrew Rambaut
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface pal.misc.Parameterized
Parameterized.Null, Parameterized.ParameterizedBase, Parameterized.ParameterizedUser, Parameterized.Utils -
Field Summary
FieldsModifier and TypeFieldDescriptiondoubletime of end of exponential growthdoublestandard error of time of growthFields inherited from class pal.coalescent.ConstExpGrowth
alpha, ALPHA_PARAMETERIZATION, alphaSE, LX_PARAMETERIZATION, N1, N1_PARAMETERIZATION, N1SE, parameterizationFields inherited from class pal.coalescent.ExponentialGrowth
r, rSEFields inherited from class pal.coalescent.ConstantPopulation
N0, N0SEFields inherited from class pal.coalescent.DemographicModel
foFields inherited from interface pal.misc.Units
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, SAMPLE, SHORT_UNIT_NAMES, UNIT_NAMES, UNKNOWN, YEARS -
Constructor Summary
ConstructorsConstructorDescriptionConstExpConst(double size, double growth, double ancestral, double timeX, int units, int parameterization) Construct demographic model of constexpconst population.ConstExpConst(int units, int parameterization) Construct demographic model with default settings. -
Method Summary
Modifier and TypeMethodDescriptionclone()Makes a copy of this demographic model.doublegetDefaultValue(int k) get default value of parameterdoublegetDemographic(double t) Gets the value of the demographic function N(t) at time t.doubledoublegetIntensity(double t) Returns value of demographic intensity function at time t (= integral 1/N(x) dx from 0 to t).doublegetInverseIntensity(double x) Returns value of inverse demographic intensity function (returns time, needed for simulation of coalescent intervals).doublegetLowerLimit(int k) get lower parameter limitintget number of parametersdoublegetParameter(int k) get model parameterdoublegetTimeX()doubleGets the time of transition from initial constant phase to exponential phase.doublegetUpperLimit(int k) get upper parameter limitstatic voidvoidreport(PrintWriter out) print human readable report (e.g., on parameters and associated model)voidsetParameter(double value, int k) set model parametervoidsetParameterSE(double value, int k) set standard errors for model parametervoidsetTimeX(double timeX) toString()Methods inherited from class pal.coalescent.ConstExpGrowth
calculateRFromLx, getAncestral, getAncestralN0, getGrowthParam, getGrowthRate, getParameterization, isLxParameterized, isN1Parameterized, setAncestral, setGrowthParam, setGrowthPhaseDuration, setParameterizationMethods inherited from class pal.coalescent.ExponentialGrowth
getSummaryTypes, getSummaryValueMethods inherited from class pal.coalescent.ConstantPopulation
getN0Methods inherited from class pal.coalescent.DemographicModel
computeLogLikelihood, computeLogLikelihood, getIntegral, getLogL, getSimulatedInterval, getUnits, setLogL, setUnits, testConsistency
-
Field Details
-
tx
public double txtime of end of exponential growth -
txSE
public double txSEstandard error of time of growth
-
-
Constructor Details
-
ConstExpConst
public ConstExpConst(int units, int parameterization) Construct demographic model with default settings. -
ConstExpConst
public ConstExpConst(double size, double growth, double ancestral, double timeX, int units, int parameterization) Construct demographic model of constexpconst population.
-
-
Method Details
-
clone
Makes a copy of this demographic model.- Overrides:
clonein classConstExpGrowth
-
getTransitionTime
public double getTransitionTime()Gets the time of transition from initial constant phase to exponential phase.- Overrides:
getTransitionTimein classConstExpGrowth
-
getGrowthPhaseDuration
public double getGrowthPhaseDuration()- Overrides:
getGrowthPhaseDurationin classConstExpGrowth- Returns:
- the duration of the growth phase
-
getTimeX
public double getTimeX()- Returns:
- the time at which the modern constant pop size gives way to exponential phase.
-
setTimeX
public void setTimeX(double timeX) -
getDemographic
public double getDemographic(double t) Description copied from class:DemographicModelGets the value of the demographic function N(t) at time t.- Overrides:
getDemographicin classConstExpGrowth- Returns:
- the population size at time t.
-
getIntensity
public double getIntensity(double t) Description copied from class:DemographicModelReturns value of demographic intensity function at time t (= integral 1/N(x) dx from 0 to t).- Overrides:
getIntensityin classConstExpGrowth- Returns:
- the integral of 1 / N(t) from 0 to t.
-
getInverseIntensity
public double getInverseIntensity(double x) Description copied from class:DemographicModelReturns value of inverse demographic intensity function (returns time, needed for simulation of coalescent intervals).- Overrides:
getInverseIntensityin classConstExpGrowth- Returns:
- the time for the given intensity.
-
getNumParameters
public int getNumParameters()Description copied from interface:Parameterizedget number of parameters- Specified by:
getNumParametersin interfaceParameterized- Overrides:
getNumParametersin classConstExpGrowth- Returns:
- number of parameters
-
getParameter
public double getParameter(int k) Description copied from interface:Parameterizedget model parameter- Specified by:
getParameterin interfaceParameterized- Overrides:
getParameterin classConstExpGrowth- Parameters:
k- parameter number- Returns:
- parameter value
-
getUpperLimit
public double getUpperLimit(int k) Description copied from interface:Parameterizedget upper parameter limit- Specified by:
getUpperLimitin interfaceParameterized- Overrides:
getUpperLimitin classConstExpGrowth- Parameters:
k- parameter number- Returns:
- upper bound
-
getLowerLimit
public double getLowerLimit(int k) Description copied from interface:Parameterizedget lower parameter limit- Specified by:
getLowerLimitin interfaceParameterized- Overrides:
getLowerLimitin classConstExpGrowth- Parameters:
k- parameter number- Returns:
- lower bound
-
getDefaultValue
public double getDefaultValue(int k) Description copied from interface:Parameterizedget default value of parameter- Specified by:
getDefaultValuein interfaceParameterized- Overrides:
getDefaultValuein classConstExpGrowth- Parameters:
k- parameter number- Returns:
- default value
-
setParameter
public void setParameter(double value, int k) Description copied from interface:Parameterizedset model parameter- Specified by:
setParameterin interfaceParameterized- Overrides:
setParameterin classConstExpGrowth- Parameters:
value- parameter valuek- parameter number
-
setParameterSE
public void setParameterSE(double value, int k) Description copied from interface:Parameterizedset standard errors for model parameter- Specified by:
setParameterSEin interfaceParameterized- Overrides:
setParameterSEin classConstExpGrowth- Parameters:
value- standard error of parameter valuek- parameter number
-
toString
- Overrides:
toStringin classConstExpGrowth
-
report
Description copied from interface:Reportprint human readable report (e.g., on parameters and associated model)- Specified by:
reportin interfaceReport- Overrides:
reportin classConstExpGrowth- Parameters:
out- output stream
-
main
-