|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpal.coalescent.DemographicModel
pal.coalescent.ConstantPopulation
pal.coalescent.ExponentialGrowth
pal.coalescent.ConstExpGrowth
public class ConstExpGrowth
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). 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 or N1 = N0). It is similar but not identical to the model used in ExpandingPopulation.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface pal.misc.Parameterized |
---|
Parameterized.Null, Parameterized.ParameterizedBase, Parameterized.ParameterizedUser, Parameterized.Utils |
Field Summary | |
---|---|
double |
alpha
ratio of pop. |
static int |
ALPHA_PARAMETERIZATION
use alpha instead of N1 parameterization |
double |
alphaSE
standard error of time alpha |
static int |
LX_PARAMETERIZATION
use lx instead of growth parameterization |
double |
N1
ancestral pop. |
static int |
N1_PARAMETERIZATION
use N1 instead of alpha parameterization |
double |
N1SE
standard error of ancestral pop. |
int |
parameterization
parameterization bit string: first bit: 0 = ALPHA, 1 = N1 second bit: 0 = GROWTH RATE, 1 = LX |
Fields 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 | |
---|---|
ConstExpGrowth(double size,
double growthParam,
double ancestral,
int units,
int parameterization)
Construct demographic model of an expanding population. |
|
ConstExpGrowth(int units,
int parameterization)
Construct demographic model with default settings. |
Method Summary | |
---|---|
protected void |
calculateRFromLx()
|
java.lang.Object |
clone()
|
double |
getAncestral()
returns ancestral parameter. |
double |
getAncestralN0()
returns ancestral population size |
double |
getDefaultValue(int k)
get default value of parameter |
double |
getDemographic(double t)
Gets the value of the demographic function N(t) at time t. |
double |
getGrowthParam()
|
double |
getGrowthPhaseDuration()
|
double |
getGrowthRate()
This method overrides superclass to check parameterization. |
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 limit |
int |
getNumParameters()
get number of parameters |
double |
getParameter(int k)
get model parameter |
int |
getParameterization()
|
double |
getTransitionTime()
Gets the time of transition from ancestral constant phase to exponential phase. |
double |
getUpperLimit(int k)
get upper parameter limit |
boolean |
isLxParameterized()
|
boolean |
isN1Parameterized()
|
void |
report(java.io.PrintWriter out)
print human readable report (e.g., on parameters and associated model) |
void |
setAncestral(double ancestral)
Sets the ancestral parameter. |
void |
setGrowthParam(double g)
Sets the growth parameter. |
void |
setGrowthPhaseDuration(double lx)
Sets the length of the growth phase. |
void |
setParameter(double value,
int k)
set model parameter |
void |
setParameterization(int p)
Sets the parameterization. |
void |
setParameterSE(double value,
int k)
set standard errors for model parameter |
java.lang.String |
toString()
|
Methods inherited from class pal.coalescent.ExponentialGrowth |
---|
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 |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ALPHA_PARAMETERIZATION
public static final int N1_PARAMETERIZATION
public static final int LX_PARAMETERIZATION
public int parameterization
public double alpha
public double alphaSE
public double N1
public double N1SE
Constructor Detail |
---|
public ConstExpGrowth(int units, int parameterization)
parameterization
- is a combination of bits representing the parameterization. Valid values are:public ConstExpGrowth(double size, double growthParam, double ancestral, int units, int parameterization)
Method Detail |
---|
public java.lang.Object clone()
clone
in class ExponentialGrowth
public double getTransitionTime()
public double getAncestral()
public double getGrowthParam()
public double getGrowthRate()
getGrowthRate
in class ExponentialGrowth
public void setAncestral(double ancestral)
public void setGrowthParam(double g)
public double getAncestralN0()
public double getGrowthPhaseDuration()
public void setGrowthPhaseDuration(double lx)
public int getParameterization()
public boolean isLxParameterized()
public boolean isN1Parameterized()
public void setParameterization(int p)
parameterization
- is a combination of bits representing the parameterization. Valid values are:protected void calculateRFromLx()
public double getDemographic(double t)
DemographicModel
getDemographic
in class ExponentialGrowth
public double getIntensity(double t)
DemographicModel
getIntensity
in class ExponentialGrowth
public double getInverseIntensity(double x)
DemographicModel
getInverseIntensity
in class ExponentialGrowth
public int getNumParameters()
Parameterized
getNumParameters
in interface Parameterized
getNumParameters
in class ExponentialGrowth
public double getParameter(int k)
Parameterized
getParameter
in interface Parameterized
getParameter
in class ExponentialGrowth
k
- parameter number
public double getUpperLimit(int k)
Parameterized
getUpperLimit
in interface Parameterized
getUpperLimit
in class ExponentialGrowth
k
- parameter number
public double getLowerLimit(int k)
Parameterized
getLowerLimit
in interface Parameterized
getLowerLimit
in class ExponentialGrowth
k
- parameter number
public double getDefaultValue(int k)
Parameterized
getDefaultValue
in interface Parameterized
getDefaultValue
in class ExponentialGrowth
k
- parameter number
public void setParameter(double value, int k)
Parameterized
setParameter
in interface Parameterized
setParameter
in class ExponentialGrowth
value
- parameter valuek
- parameter numberpublic void setParameterSE(double value, int k)
Parameterized
setParameterSE
in interface Parameterized
setParameterSE
in class ExponentialGrowth
value
- standard error of parameter valuek
- parameter numberpublic java.lang.String toString()
toString
in class ExponentialGrowth
public void report(java.io.PrintWriter out)
Report
report
in interface Report
report
in class ExponentialGrowth
out
- output stream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |