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 TypeFieldDescriptiondoubleratio of pop.doublestandard error of time alphaFields 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
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()doublegetDefaultValue(int k) get default value of parameterdoublegetDemographic(double t) Gets the value of the demographic function N(t) at time t.doublegetIntensity(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 parameterdoublegetRatio()returns ratio of population sizesdoublegetUpperLimit(int k) get upper parameter limitvoidreport(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 parametertoString()Methods inherited from class pal.coalescent.ExponentialGrowth
getGrowthRate, 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
-
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:
clonein classExponentialGrowth
-
getRatio
public double getRatio()returns ratio of population sizes -
getDemographic
public double getDemographic(double t) Description copied from class:DemographicModelGets the value of the demographic function N(t) at time t.- Overrides:
getDemographicin classExponentialGrowth
-
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 classExponentialGrowth
-
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 classExponentialGrowth
-
getNumParameters
public int getNumParameters()Description copied from interface:Parameterizedget number of parameters- Specified by:
getNumParametersin interfaceParameterized- Overrides:
getNumParametersin classExponentialGrowth- Returns:
- number of parameters
-
getParameter
public double getParameter(int k) Description copied from interface:Parameterizedget model parameter- Specified by:
getParameterin interfaceParameterized- Overrides:
getParameterin classExponentialGrowth- 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 classExponentialGrowth- 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 classExponentialGrowth- 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 classExponentialGrowth- 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 classExponentialGrowth- 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 classExponentialGrowth- Parameters:
value- standard error of parameter valuek- parameter number
-
toString
- Overrides:
toStringin classExponentialGrowth
-
report
Description copied from interface:Reportprint human readable report (e.g., on parameters and associated model)- Specified by:
reportin interfaceReport- Overrides:
reportin classExponentialGrowth- Parameters:
out- output stream
-