Package pal.coalescent
Class ExpandingPopulation
java.lang.Object
pal.coalescent.DemographicModel
pal.coalescent.ConstantPopulation
pal.coalescent.ExponentialGrowth
pal.coalescent.ExpandingPopulation
- All Implemented Interfaces:
Serializable
,Cloneable
,Parameterized
,Report
,Summarizable
,Units
public class ExpandingPopulation
extends ExponentialGrowth
implements Report, Parameterized, Serializable
This class models a population that grows
exponentially from an inital population size alpha N0 to a present-day size N0.
(Parameters: N0=present-day population size; r=growth rate; alpha: ratio of
population sizes).
This model is nested with the exponential-growth model (alpha -> 0).
- Version:
- $Id: ExpandingPopulation.java,v 1.6 2001/07/12 12:17:43 korbinian Exp $
- Author:
- Korbinian Strimmer
- 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 TypeFieldDescriptiondouble
ratio of pop.double
standard error of time alphaFields inherited from class pal.coalescent.ExponentialGrowth
r, rSE
Fields inherited from class pal.coalescent.ConstantPopulation
N0, N0SE
Fields inherited from class pal.coalescent.DemographicModel
fo
Fields inherited from interface pal.misc.Units
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, SAMPLE, SHORT_UNIT_NAMES, UNIT_NAMES, UNKNOWN, YEARS
-
Constructor Summary
ConstructorsConstructorDescriptionExpandingPopulation
(double size, double growth, double ratio, int units) Construct demographic model of an expanding populationExpandingPopulation
(int units) Construct demographic model with default settings -
Method Summary
Modifier and TypeMethodDescriptionclone()
double
getDefaultValue
(int k) get default value of parameterdouble
getDemographic
(double t) Gets the value of the demographic function N(t) at time t.double
getIntensity
(double t) Returns value of demographic intensity function at time t (= integral 1/N(x) dx from 0 to t).double
getInverseIntensity
(double x) Returns value of inverse demographic intensity function (returns time, needed for simulation of coalescent intervals).double
getLowerLimit
(int k) get lower parameter limitint
get number of parametersdouble
getParameter
(int k) get model parameterdouble
getRatio()
returns ratio of population sizesdouble
getUpperLimit
(int k) get upper parameter limitvoid
report
(PrintWriter out) print human readable report (e.g., on parameters and associated model)void
setParameter
(double value, int k) set model parametervoid
setParameterSE
(double value, int k) set standard errors for model parametertoString()
Methods inherited from class pal.coalescent.ExponentialGrowth
getGrowthRate, getSummaryTypes, getSummaryValue
Methods inherited from class pal.coalescent.ConstantPopulation
getN0
Methods inherited from class pal.coalescent.DemographicModel
computeLogLikelihood, computeLogLikelihood, getIntegral, getLogL, getSimulatedInterval, getUnits, setLogL, setUnits, testConsistency
-
Field Details
-
alpha
public double alpharatio of pop. sizes -
alphaSE
public double alphaSEstandard error of time alpha
-
-
Constructor Details
-
ExpandingPopulation
public ExpandingPopulation(int units) Construct demographic model with default settings -
ExpandingPopulation
public ExpandingPopulation(double size, double growth, double ratio, int units) Construct demographic model of an expanding population
-
-
Method Details
-
clone
- Overrides:
clone
in classExponentialGrowth
-
getRatio
public double getRatio()returns ratio of population sizes -
getDemographic
public double getDemographic(double t) Description copied from class:DemographicModel
Gets the value of the demographic function N(t) at time t.- Overrides:
getDemographic
in classExponentialGrowth
-
getIntensity
public double getIntensity(double t) Description copied from class:DemographicModel
Returns value of demographic intensity function at time t (= integral 1/N(x) dx from 0 to t).- Overrides:
getIntensity
in classExponentialGrowth
-
getInverseIntensity
public double getInverseIntensity(double x) Description copied from class:DemographicModel
Returns value of inverse demographic intensity function (returns time, needed for simulation of coalescent intervals).- Overrides:
getInverseIntensity
in classExponentialGrowth
-
getNumParameters
public int getNumParameters()Description copied from interface:Parameterized
get number of parameters- Specified by:
getNumParameters
in interfaceParameterized
- Overrides:
getNumParameters
in classExponentialGrowth
- Returns:
- number of parameters
-
getParameter
public double getParameter(int k) Description copied from interface:Parameterized
get model parameter- Specified by:
getParameter
in interfaceParameterized
- Overrides:
getParameter
in classExponentialGrowth
- Parameters:
k
- parameter number- Returns:
- parameter value
-
getUpperLimit
public double getUpperLimit(int k) Description copied from interface:Parameterized
get upper parameter limit- Specified by:
getUpperLimit
in interfaceParameterized
- Overrides:
getUpperLimit
in classExponentialGrowth
- Parameters:
k
- parameter number- Returns:
- upper bound
-
getLowerLimit
public double getLowerLimit(int k) Description copied from interface:Parameterized
get lower parameter limit- Specified by:
getLowerLimit
in interfaceParameterized
- Overrides:
getLowerLimit
in classExponentialGrowth
- Parameters:
k
- parameter number- Returns:
- lower bound
-
getDefaultValue
public double getDefaultValue(int k) Description copied from interface:Parameterized
get default value of parameter- Specified by:
getDefaultValue
in interfaceParameterized
- Overrides:
getDefaultValue
in classExponentialGrowth
- Parameters:
k
- parameter number- Returns:
- default value
-
setParameter
public void setParameter(double value, int k) Description copied from interface:Parameterized
set model parameter- Specified by:
setParameter
in interfaceParameterized
- Overrides:
setParameter
in classExponentialGrowth
- Parameters:
value
- parameter valuek
- parameter number
-
setParameterSE
public void setParameterSE(double value, int k) Description copied from interface:Parameterized
set standard errors for model parameter- Specified by:
setParameterSE
in interfaceParameterized
- Overrides:
setParameterSE
in classExponentialGrowth
- Parameters:
value
- standard error of parameter valuek
- parameter number
-
toString
- Overrides:
toString
in classExponentialGrowth
-
report
Description copied from interface:Report
print human readable report (e.g., on parameters and associated model)- Specified by:
report
in interfaceReport
- Overrides:
report
in classExponentialGrowth
- Parameters:
out
- output stream
-