|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpal.coalescent.DemographicModel
pal.coalescent.ConstantPopulation
public class ConstantPopulation
This class models coalescent intervals for a constant population
(parameter: N0=present-day population size).
If time units are set to Units.EXPECTED_SUBSTITUTIONS then
the N0 parameter will be interpreted as N0 * mu.
Also note that if you are dealing with a diploid population
N0 will be out by a factor of 2.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface pal.misc.Parameterized |
---|
Parameterized.Null, Parameterized.ParameterizedBase, Parameterized.ParameterizedUser, Parameterized.Utils |
Field Summary | |
---|---|
double |
N0
population size |
double |
N0SE
standard error of population size |
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 | |
---|---|
ConstantPopulation(double size,
int units)
Construct demographic model of a constant population size. |
|
ConstantPopulation(int units)
Construct demographic model with default settings |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
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 |
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 |
double |
getN0()
returns initial population size. |
int |
getNumParameters()
get number of parameters |
double |
getParameter(int k)
get model parameter |
java.lang.String[] |
getSummaryTypes()
|
double |
getSummaryValue(int summaryType)
|
double |
getUpperLimit(int k)
get upper parameter limit |
void |
report(java.io.PrintWriter out)
print human readable report (e.g., on parameters and associated model) |
void |
setParameter(double value,
int k)
set model parameter |
void |
setParameterSE(double value,
int k)
set standard errors for model parameter |
java.lang.String |
toString()
|
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 double N0
public double N0SE
Constructor Detail |
---|
public ConstantPopulation(int units)
public ConstantPopulation(double size, int units)
Method Detail |
---|
public java.lang.Object clone()
clone
in class DemographicModel
public java.lang.String[] getSummaryTypes()
getSummaryTypes
in interface Summarizable
public double getSummaryValue(int summaryType)
getSummaryValue
in interface Summarizable
public double getN0()
public double getDemographic(double t)
DemographicModel
getDemographic
in class DemographicModel
public double getIntensity(double t)
DemographicModel
getIntensity
in class DemographicModel
public double getInverseIntensity(double x)
DemographicModel
getInverseIntensity
in class DemographicModel
public int getNumParameters()
Parameterized
getNumParameters
in interface Parameterized
public double getParameter(int k)
Parameterized
getParameter
in interface Parameterized
k
- parameter number
public double getUpperLimit(int k)
Parameterized
getUpperLimit
in interface Parameterized
k
- parameter number
public double getLowerLimit(int k)
Parameterized
getLowerLimit
in interface Parameterized
k
- parameter number
public double getDefaultValue(int k)
Parameterized
getDefaultValue
in interface Parameterized
k
- parameter number
public void setParameter(double value, int k)
Parameterized
setParameter
in interface Parameterized
value
- parameter valuek
- parameter numberpublic void setParameterSE(double value, int k)
Parameterized
setParameterSE
in interface Parameterized
value
- standard error of parameter valuek
- parameter numberpublic java.lang.String toString()
toString
in class java.lang.Object
public void report(java.io.PrintWriter out)
Report
report
in interface Report
out
- output stream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |