# RevBayes Manual Pages :: Index

Functions

Probability

## Usage

Probability(Real x)

## Arguments

x
The value.

Argument type: pass by const reference
Value type: Real

[]

## Usage

[](Integer[] v, Natural index)

## Arguments

v
The vector.

Argument type: pass by const reference
Value type: Integer[]

index
The index.

Argument type: pass by const reference
Value type: Natural

The 'abs' function returns the absolute value of a number.

abs

## Description

The 'abs' function returns the absolute value of a number.

abs(Real x)

## Arguments

x
A (possibly negative) number.

Argument type: pass by const reference
Value type: Real

## Example

```# compute the absolute value of a real number
number <- -3.0
absoluteValueOfTheNumber <- abs(number)
if (number + absoluteValueOfTheNumber != 0.0) {
print("Problem when computing an absolute value.")
} else {
print("Correct computation of an absolute value.")
}
```

Sebastian Hoehna

## Name

ancestralStateTree

## Usage

ancestralStateTree(Tree inputtree, AncestralStateTrace[] ancestralstatetrace_vector, TraceTree TraceTree, String file, Integer burnin)

## Arguments

inputtree
The input tree.

Argument type: pass by value
Value type: Tree

ancestralstatetrace_vector
A vector of ancestral state traces.

Argument type: pass by value
Value type: AncestralStateTrace[]

TraceTree
A vector (trace) of tree samples.

Argument type: pass by value
Value type: TraceTree

file
The name of the file where to store the annotated tree.

Argument type: pass by value
Value type: String

burnin
The number of samples to discard as burnin.

Argument type: pass by value
Value type: Integer
Default value -1

annotateHPDAges

## Usage

annotateHPDAges(Probability hpd, Tree inputtree, TraceTree TraceTree, String file, Integer burnin)

## Arguments

hpd
The probability contained in the highest posterior density interval.

Argument type: pass by value
Value type: Probability
Default value 0.95

inputtree
The input tree which will be annotated.

Argument type: pass by value
Value type: Tree

TraceTree
The sample trace.

Argument type: pass by value
Value type: TraceTree

file
The name of the file where to store the tree.

Argument type: pass by value
Value type: String

burnin
The number of samples to discard as burnin.

Argument type: pass by value
Value type: Integer
Default value -1

## Name

branchScoreDistance

## Usage

branchScoreDistance(TimeTree tree1, TimeTree tree2)

## Arguments

tree1
The first tree.

Argument type: pass by const reference
Value type: TimeTree

tree2
The second tree.

Argument type: pass by const reference
Value type: TimeTree

The 'ceil' function maps the value of a number to the smallest following integer.

ceil

## Description

The 'ceil' function maps the value of a number to the smallest following integer.

ceil(Real x)

## Arguments

x
The value.

Argument type: pass by const reference
Value type: Real

## Example

```# compute the ceiling of a real number
number <- 3.4
ceiled_number <- ceil(number)
if (ceiled_number != 4.0) {
print("Problem when computing a ceiled value.")
} else {
print("Correct computation of a ceiled value.")
}
```

Sebastian Hoehna

## Arguments

taxa
A vector a taxa that is contained in this clade.

Argument type: pass by value
Value type: String[]

age
The age of the clade (optional).

Argument type: pass by value
Value type: RealPos
Default value NULL

concatenate

## Usage

concatenate(AbstractHomologousDiscreteCharacterData a, AbstractHomologousDiscreteCharacterData v, AbstractHomologousDiscreteCharacterData ...)

## Arguments

a
First character data object.

Argument type: pass by const reference
Value type: AbstractHomologousDiscreteCharacterData

v
Second character data object.

Argument type: pass by const reference
Value type: AbstractHomologousDiscreteCharacterData

Argument type: pass by const reference
Value type: AbstractHomologousDiscreteCharacterData

consensusTree

## Usage

consensusTree(TraceTree TraceTree, String file, RealPos cutoff, Integer burnin)

## Arguments

TraceTree
The trace of tree samples.

Argument type: pass by value
Value type: TraceTree

file
The name of the file for storing the tree.

Argument type: pass by value
Value type: String

cutoff
The minimum threshold for clade probabilities.

Argument type: pass by value
Value type: RealPos

burnin
The number of samples to discard as burnin.

Argument type: pass by value
Value type: Integer
Default value -1

## Name

convertToPhylowood

## Usage

convertToPhylowood(String statefile, String treefile, String geofile, String outfile, Probability burnin, String chartype {valid options: "NaturalNumbers"|"Standard"} , String bgtype {valid options: "Range"|"Area"} )

## Arguments

statefile

Argument type: pass by value
Value type: String

treefile

Argument type: pass by value
Value type: String

geofile

Argument type: pass by value
Value type: String

outfile

Argument type: pass by value
Value type: String

burnin

Argument type: pass by value
Value type: Probability
Default value -1

chartype

Argument type: pass by value
Value type: String

Options
NaturalNumbers
Standard

Default value "NaturalNumbers"

bgtype

Argument type: pass by value
Value type: String

Options
Range
Area

Default value "Area"

dBDPTopology

## Usage

dBDPTopology(TimeTree x, RealPos lambda, RealPos mu, RealPos origin, RealPos rootAge, Probability rho, String samplingStrategy {valid options: "uniform"|"diversified"} , String condition {valid options: "time"|"survival"|"nTaxa"} , Taxon[] taxa, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: TimeTree

lambda
The constant speciation rate.

Argument type: pass by const reference
Value type: RealPos

mu
The constant extinction rate.

Argument type: pass by const reference
Value type: RealPos
Default value 0

origin
The time of the process starting at the origin, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rootAge
The time of the process starting at the root, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rho
The taxon sampling probability.

Argument type: pass by const reference
Value type: Probability
Default value 1

samplingStrategy
The sampling strategy of including taxa at the present.

Argument type: pass by value
Value type: String

Options
uniform
diversified

Default value "uniform"

condition
The condition of the process.

Argument type: pass by value
Value type: String

Options
time
survival
nTaxa

Default value "survival"

taxa
The taxa used for initialization.

Argument type: pass by const reference
Value type: Taxon[]
Default value NULL

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dBimodalLognormal

## Usage

dBimodalLognormal(RealPos x, Real mean1, Real mean2, RealPos sd1, RealPos sd2, Probability p, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: RealPos

mean1
The mean (in log-space) of the first lognormal distribution.

Argument type: pass by const reference
Value type: Real

mean2
The mean (in log-space) of the second lognormal distribution.

Argument type: pass by const reference
Value type: Real

sd1
The standard deviation of the first lognormal distribution.

Argument type: pass by const reference
Value type: RealPos

sd2
The standard deviation of the secind lognormal distribution.

Argument type: pass by const reference
Value type: RealPos

p
The probability to belong to the first distribution.

Argument type: pass by const reference
Value type: Probability

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dBimodalNormal

## Usage

dBimodalNormal(Real x, Real mean1, Real mean2, RealPos sd1, RealPos sd2, Probability p, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Real

mean1
Mean of the first normal distribution.

Argument type: pass by const reference
Value type: Real

mean2
Mean of the second normal distribution.

Argument type: pass by const reference
Value type: Real

sd1
Standard deviation of the first normal distributin.

Argument type: pass by const reference
Value type: RealPos

sd2
Standard deviation of the second normal distribution.

Argument type: pass by const reference
Value type: RealPos

p
Probability that the value belongs to the first normal distribution.

Argument type: pass by const reference
Value type: Probability

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dBirthDeath

dBDP

## Usage

dBirthDeath(TimeTree x, RealPos lambda, RealPos mu, RealPos origin, RealPos rootAge, Probability rho, String samplingStrategy {valid options: "uniform"|"diversified"} , String condition {valid options: "time"|"survival"|"nTaxa"} , Taxon[] taxa, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: TimeTree

lambda
The constant speciation rate.

Argument type: pass by const reference
Value type: RealPos

mu
The constant extinction rate.

Argument type: pass by const reference
Value type: RealPos
Default value 0

origin
The time of the process starting at the origin, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rootAge
The time of the process starting at the root, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rho
The taxon sampling probability.

Argument type: pass by const reference
Value type: Probability
Default value 1

samplingStrategy
The sampling strategy of including taxa at the present.

Argument type: pass by value
Value type: String

Options
uniform
diversified

Default value "uniform"

condition
The condition of the process.

Argument type: pass by value
Value type: String

Options
time
survival
nTaxa

Default value "survival"

taxa
The taxa used for initialization.

Argument type: pass by const reference
Value type: Taxon[]
Default value NULL

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dBirthDeathMultiRate

## Usage

dBirthDeathMultiRate(TimeTree x, RealPos origin, RealPos rootAge, Probability rho, RealPos[] lambda, RealPos[] mu, RateGenerator Q, RealPos rate, Simplex pi, String condition {valid options: "time"|"survival"} , Taxon[] taxa, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: TimeTree

origin
The origin of the process.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rootAge
The root age.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rho
The taxon-sampling probability.

Argument type: pass by const reference
Value type: Probability
Default value 1

lambda
Vector of speciation rates per rate category.

Argument type: pass by const reference
Value type: RealPos[]

mu
Vector of extinction rates per rate category.

Argument type: pass by const reference
Value type: RealPos[]

Q
Rate matrix of transition rates between diversification-rate categories.

Argument type: pass by const reference
Value type: RateGenerator

rate
Global rate of transition between rate categories.

Argument type: pass by const reference
Value type: RealPos

pi
State frequencies at the root.

Argument type: pass by const reference
Value type: Simplex

condition
The condition of the birth-death process.

Argument type: pass by value
Value type: String

Options
time
survival

Default value "survival"

taxa
The taxon names used for initialization.

Argument type: pass by value
Value type: Taxon[]

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dCoalescent

## Usage

dCoalescent(TimeTree x, RealPos theta, String[] names, Clade[] constraints, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: TimeTree

theta
The constant population size.

Argument type: pass by const reference
Value type: RealPos

names
The taxon names used when drawing a random tree.

Argument type: pass by value
Value type: String[]

constraints
The topological constraints strictly enforced.

Argument type: pass by value
Default value [ ]

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dCoalescentSkyline

## Usage

dCoalescentSkyline(TimeTree x, RealPos[] theta, RealPos[] times, String method {valid options: "events"|"uniform"|"specified"} , String[] names, Clade[] constraints, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: TimeTree

theta
A vector of per interval population sizes.

Argument type: pass by const reference
Value type: RealPos[]

times
A vector of times for the intervals, if applicable.

Argument type: pass by const reference
Value type: RealPos[]
Default value NULL

method
The method how intervals are defined.

Argument type: pass by value
Value type: String

Options
events
uniform
specified

Default value "events"

names
The names of the taxa used for simulation.

Argument type: pass by value
Value type: String[]

constraints
The strictly enforced topology constraints.

Argument type: pass by value
Default value [ ]

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dDPP

## Usage

dDPP(Real[] x, RealPos concentration, Distribution__Real baseDistribution, Natural numElements, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Real[]

concentration
The concentration parameter.

Argument type: pass by const reference
Value type: RealPos

baseDistribution
The base distribution for the per category values.

Argument type: pass by const reference
Value type: Distribution__Real

numElements
The number of elements drawn from this distribution.

Argument type: pass by value
Value type: Natural

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dDecomposedInvWishart

## Usage

dDecomposedInvWishart(MatrixReal x, MatrixRealSymmetric sigma, RealPos[] diagonal, Natural df, RealPos kappa, Natural dim, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: MatrixReal

sigma

Argument type: pass by const reference
Value type: MatrixRealSymmetric
Default value [ [ 0.0000 ] ]

diagonal

Argument type: pass by const reference
Value type: RealPos[]
Default value [ ]

df

Argument type: pass by const reference
Value type: Natural
Default value 0

kappa

Argument type: pass by const reference
Value type: RealPos
Default value 0

dim

Argument type: pass by const reference
Value type: Natural
Default value 0

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dDiversityDependentYule

## Usage

dDiversityDependentYule(TimeTree x, RealPos lambda, Natural capacity, RealPos origin, RealPos rootAge, String condition {valid options: "time"|"survival"|"nTaxa"} , Taxon[] taxa, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: TimeTree

lambda
The initial speciation rate.

Argument type: pass by const reference
Value type: RealPos

capacity
The carrying capacity.

Argument type: pass by const reference
Value type: Natural

origin
The time of the process since the origin, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rootAge
The time of the process since the root, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

condition
The condition of the process.

Argument type: pass by value
Value type: String

Options
time
survival
nTaxa

Default value "survival"

taxa
The names of the taxa used for simulation.

Argument type: pass by value
Value type: Taxon[]

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dEmpiricalTree

## Usage

dEmpiricalTree(Tree x, Natural burnin, TraceTree TraceTree, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Tree

burnin
The number of samples to discard.

Argument type: pass by value
Value type: Natural

TraceTree
The trace of tree samples.

Argument type: pass by value
Value type: TraceTree

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dFossilBirthDeath

dFBDP

## Usage

dFossilBirthDeath(TimeTree x, RealPos lambda, RealPos mu, RealPos psi, RealPos origin, RealPos rootAge, Probability rho, String samplingStrategy {valid options: "uniform"|"diversified"} , String condition {valid options: "time"|"survival"|"nTaxa"} , Taxon[] taxa, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: TimeTree

lambda
The constant speciation rate.

Argument type: pass by const reference
Value type: RealPos

mu
The constant extinction rate.

Argument type: pass by const reference
Value type: RealPos
Default value 0

psi
The constant fossilization rate.

Argument type: pass by const reference
Value type: RealPos
Default value 0

origin
The time of the process starting at the origin, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rootAge
The time of the process starting at the root, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rho
The taxon sampling probability.

Argument type: pass by const reference
Value type: Probability
Default value 1

samplingStrategy
The sampling strategy of including taxa at the present.

Argument type: pass by value
Value type: String

Options
uniform
diversified

Default value "uniform"

condition
The condition of the process.

Argument type: pass by value
Value type: String

Options
time
survival
nTaxa

Default value "survival"

taxa
The taxa used for initialization.

Argument type: pass by const reference
Value type: Taxon[]
Default value NULL

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dInverseWishart

dinvWishart

## Usage

dInverseWishart(MatrixRealSymmetric x, MatrixRealSymmetric sigma, RealPos[] diagonal, Natural df, RealPos kappa, Natural dim, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: MatrixRealSymmetric

sigma

Argument type: pass by const reference
Value type: MatrixRealSymmetric
Default value NULL

diagonal

Argument type: pass by const reference
Value type: RealPos[]
Default value NULL

df

Argument type: pass by const reference
Value type: Natural
Default value NULL

kappa

Argument type: pass by const reference
Value type: RealPos
Default value NULL

dim

Argument type: pass by const reference
Value type: Natural
Default value NULL

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dMixture

## Usage

dMixture(Real x, Real[] values, Simplex probabilities, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Real

values
The potential values.

Argument type: pass by const reference
Value type: Real[]

probabilities
The probabilitoes for each value.

Argument type: pass by const reference
Value type: Simplex

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dMultiSpeciesCoalescent

## Usage

dMultiSpeciesCoalescent(TimeTree x, TimeTree speciesTree, RealPos|RealPos[] Ne, Taxon[] taxa, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: TimeTree

speciesTree
The species in which the gene trees evolve.

Argument type: pass by const reference
Value type: TimeTree

Ne
The population sizes.

Argument type: pass by const reference
Value type: RealPos

taxa
The vector of taxa which have species and individual names.

Argument type: pass by value
Value type: Taxon[]

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dMultivariateNormal

## Usage

dMultivariateNormal(Real[] x, Real[] mean, MatrixRealSymmetric covariance, MatrixRealSymmetric precision, RealPos scale, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Real[]

mean
The vector of mean values.

Argument type: pass by const reference
Value type: Real[]

covariance
The variance-covariance matrix.

Argument type: pass by const reference
Value type: MatrixRealSymmetric
Default value NULL

precision
The precision matrix.

Argument type: pass by const reference
Value type: MatrixRealSymmetric
Default value NULL

scale
The scaling factor of the variance matrix.

Argument type: pass by const reference
Value type: RealPos
Default value 1

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dNormal

## Usage

dNormal(Real x, Real mean, RealPos sd, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Real

mean
The mean parameter.

Argument type: pass by const reference
Value type: Real
Default value 0

sd
The standard deviation parameter.

Argument type: pass by const reference
Value type: RealPos
Default value 1

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dOrnsteinUhlenbeck

dOU

## Usage

dOrnsteinUhlenbeck(Real x, Real x0, Real theta, RealPos alpha, RealPos sigma, RealPos time, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Real

x0
The root parameter value.

Argument type: pass by const reference
Value type: Real

theta
The location of the optimum parameter.

Argument type: pass by const reference
Value type: Real

alpha
The attraction to the optimum parameter.

Argument type: pass by const reference
Value type: RealPos

sigma
The scaling parameter of the time.

Argument type: pass by const reference
Value type: RealPos

time
The duration of the process.

Argument type: pass by const reference
Value type: RealPos

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dPhyloBrownian

dPhyloBM

## Usage

dPhyloBrownian(Real[] x, TimeTree tree, RealPos sigma, Real drift, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Real[]

tree
The tree along which the continuous character evolves.

Argument type: pass by const reference
Value type: TimeTree

sigma
The branch-length multiplier to scale the variance of the Brownian motion.

Argument type: pass by const reference
Value type: RealPos

drift
The drift parameter of the Brownian motion.

Argument type: pass by const reference
Value type: Real
Default value 0

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dPhyloBrownianMVN

## Usage

dPhyloBrownianMVN(ContinuousCharacterData x, Tree tree, RealPos|RealPos[] branchRates, RealPos|RealPos[] siteRates, Real|Real[] rootStates, Natural nSites, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: ContinuousCharacterData

tree
The tree along which the character evolves.

Argument type: pass by const reference
Value type: Tree

branchRates
The rate of evolution along a branch.

Argument type: pass by const reference
Value type: RealPos
Default value 1

siteRates
The rate of evolution per site.

Argument type: pass by const reference
Value type: RealPos
Default value 1

rootStates
The vector of root states.

Argument type: pass by const reference
Value type: Real
Default value 0

nSites
The number of sites which is used for the initialized (random draw) from this distribution.

Argument type: pass by value
Value type: Natural
Default value 10

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dPhyloBrownianMultiVariate

## Usage

dPhyloBrownianMultiVariate(Real[][] x, TimeTree tree, MatrixRealSymmetric sigma, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Real[][]

tree
The tree along which the process evolves.

Argument type: pass by const reference
Value type: TimeTree

sigma
The variance-covariance matrix.

Argument type: pass by const reference
Value type: MatrixRealSymmetric

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dPhyloBrownianREML

## Usage

dPhyloBrownianREML(ContinuousCharacterData x, Tree tree, RealPos|RealPos[] branchRates, RealPos|RealPos[] siteRates, Natural nSites, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: ContinuousCharacterData

tree
The tree along which the process evolves.

Argument type: pass by const reference
Value type: Tree

branchRates
The per branch rate-multiplier(s).

Argument type: pass by const reference
Value type: RealPos
Default value 1

siteRates
The per site rate-multiplier(s).

Argument type: pass by const reference
Value type: RealPos
Default value 1

nSites
The number of sites used for simulation.

Argument type: pass by value
Value type: Natural
Default value 10

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dPhyloDistanceGamma

## Usage

dPhyloDistanceGamma(RlDistanceMatrix x, Tree tree, RlDistanceMatrix distanceMatrix, RlDistanceMatrix varianceMatrix, String[] names, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: RlDistanceMatrix

tree

Argument type: pass by const reference
Value type: Tree

distanceMatrix

Argument type: pass by const reference
Value type: RlDistanceMatrix

varianceMatrix

Argument type: pass by const reference
Value type: RlDistanceMatrix

names

Argument type: pass by value
Value type: String[]

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dPhyloOrnsteinUhlenbeck

dPhyloOU

## Usage

dPhyloOrnsteinUhlenbeck(Real[] x, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Real[]

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dPhyloWhiteNoise

## Usage

dPhyloWhiteNoise(RealPos[] x, TimeTree tree, RealPos sigma, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: RealPos[]

tree
The tree along which the process evolves.

Argument type: pass by const reference
Value type: TimeTree

sigma
The standard deviation.

Argument type: pass by const reference
Value type: RealPos

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dPoisson

## Usage

dPoisson(Natural x, RealPos lambda, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Natural

lambda
The rate (rate = 1/mean) parameter.

Argument type: pass by const reference
Value type: RealPos

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dReversibleJumpMixture

dRJMixture

## Usage

dReversibleJumpMixture(Real x, Real constantValue, Distribution__Real baseDistribution, Probability p, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Real

constantValue
The fixed value this distribution can take.

Argument type: pass by const reference
Value type: Real

baseDistribution
The distribution from which the value is alternatively drawn.

Argument type: pass by const reference
Value type: Distribution__Real

p
The probability of being the fixed value.

Argument type: pass by const reference
Value type: Probability

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

## Name

dSoftBoundUniformNormal

## Usage

dSoftBoundUniformNormal(Real x, Real min, Real max, RealPos sd, Probability p, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Real

min
The min value of the uniform distribution.

Argument type: pass by const reference
Value type: Real

max
The max value of the uniform distribution.

Argument type: pass by const reference
Value type: Real

sd
The standard deviation of the normal distribution.

Argument type: pass by const reference
Value type: RealPos

p
The probability of being within the uniform distribution.

Argument type: pass by const reference
Value type: Probability

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dUniform

dunif

## Usage

dUniform(Real x, Real lower, Real upper, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Real

lower
The lower bound.

Argument type: pass by const reference
Value type: Real

upper
The upper bound.

Argument type: pass by const reference
Value type: Real

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dUniformTimeTree

## Usage

dUniformTimeTree(TimeTree x, RealPos rootAge, Taxon[] taxa, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: TimeTree

rootAge
The age of the root.

Argument type: pass by const reference
Value type: RealPos

taxa
The taxa used for simulation.

Argument type: pass by value
Value type: Taxon[]

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dUniformTopology

## Usage

dUniformTopology(BranchLengthTree x, Taxon[] taxa, Clade[] constraints, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: BranchLengthTree

taxa
The vector of taxa that will be used for the tips.

Argument type: pass by const reference
Value type: Taxon[]
Default value NULL

constraints
The topological constraints that will be enforced.

Argument type: pass by value
Default value NULL

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dWishart

## Usage

dWishart(MatrixRealSymmetric x, Natural df, RealPos kappa, Natural dim, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: MatrixRealSymmetric

df
The degrees of dreedom.

Argument type: pass by const reference
Value type: Natural

kappa
The scaling parameter.

Argument type: pass by const reference
Value type: RealPos

dim
The dimension of the distribution.

Argument type: pass by const reference
Value type: Natural

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dbernoulli

## Usage

dbernoulli(Natural x, Probability p, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Natural

p
The probability of success.

Argument type: pass by const reference
Value type: Probability

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dbeta

## Usage

dbeta(Probability x, RealPos alpha, RealPos beta, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Probability

alpha
The alpha shape parameter.

Argument type: pass by const reference
Value type: RealPos

beta
The beta shape parameter.

Argument type: pass by const reference
Value type: RealPos

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dbinomial

## Usage

dbinomial(Natural x, Probability p, Natural n, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Natural

p
Probability of success.

Argument type: pass by const reference
Value type: Probability

n
Number of trials.

Argument type: pass by const reference
Value type: Natural

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dcategorical

dcat

## Usage

dcategorical(Natural x, Simplex p, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Natural

p
The probability for each category.

Argument type: pass by const reference
Value type: Simplex

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dchisq

## Usage

dchisq(RealPos x, Natural df, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: RealPos

df
The degrees of freedom.

Argument type: pass by const reference
Value type: Natural

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dcppNormal

## Usage

dcppNormal(Real x, RealPos lambda, Real mu, RealPos sigma, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Real

lambda
The rate of the Poisson distribution.

Argument type: pass by const reference
Value type: RealPos

mu
The mean of the normal distribution

Argument type: pass by const reference
Value type: Real

sigma
The standard deviation of the normal distribution

Argument type: pass by const reference
Value type: RealPos

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

ddirichlet

## Usage

ddirichlet(Simplex x, RealPos[] alpha, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Simplex

alpha
The concentration parameter.

Argument type: pass by const reference
Value type: RealPos[]

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dexponential

dexp

## Usage

dexponential(RealPos x, RealPos lambda, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: RealPos

lambda
The rate ( rate==1/mean) parameter.

Argument type: pass by const reference
Value type: RealPos
Default value 1

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dgamma

## Usage

dgamma(RealPos x, RealPos shape, RealPos rate, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: RealPos

shape
The shape parameter.

Argument type: pass by const reference
Value type: RealPos

rate
The rate parameter (rate = 1/scale).

Argument type: pass by const reference
Value type: RealPos

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dgeometric

dgeom

## Usage

dgeometric(Natural x, Probability p, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Natural

p
The probability of success.

Argument type: pass by const reference
Value type: Probability

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

Building a identity/diagonal matrix with 'n' columns and rows.

diagonalMatrix

## Description

Building a identity/diagonal matrix with 'n' columns and rows.

## Usage

diagonalMatrix(Natural n)

## Arguments

n
The number of rows/columns (dimension).

Argument type: pass by value
Value type: Natural

Sebastian Hoehna

dlognormal

dlnorm

## Usage

dlognormal(RealPos x, Real mean, RealPos sd, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: RealPos

mean
The mean in log-space (observed mean is exp(m)).

Argument type: pass by const reference
Value type: Real

sd
The standard deviation in log-space.

Argument type: pass by const reference
Value type: RealPos

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dloguniform

## Usage

dloguniform(RealPos x, RealPos min, RealPos max, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: RealPos

min
The lower bound.

Argument type: pass by const reference
Value type: RealPos

max
The upper bound.

Argument type: pass by const reference
Value type: RealPos

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

dmultinomial

## Usage

dmultinomial(Natural[] x, Simplex p, Natural n, Bool log)

## Arguments

x
The observed value.

Argument type: pass by const reference
Value type: Natural[]

p
The simplex of probabilities for the categories.

Argument type: pass by const reference
Value type: Simplex

n
The number of draws.

Argument type: pass by const reference
Value type: Natural

log
Log-transformed probability?

Argument type: pass by value
Value type: Bool
Default value true

Determines whether the RevBayes workspace contains a variable named 'name'

exists

## Description

Determines whether the RevBayes workspace contains a variable named 'name'

## Usage

exists(String name)

## Arguments

name
The name of the variable we wish to check for existence.

Argument type: pass by value
Value type: String

## Details

'exists' returns 'true' if the workspace contains a variable whose name matches the String 'name' and 'false' otherwise. One use of 'exists' is to add Move and Monitor objects conditional on the variable 'x' existing. The function 'ls' provides a summary for all variable names that 'exists' would evaluate as 'true'.

## Example

```## Correct usage: does "x" exist?
x <- 1.0
exists("x")

## Incorrect usage: does "1.0" exist?
exists(x)
```

Michael Landis

exp

exp(Real x)

## Arguments

x
A number.

Argument type: pass by const reference
Value type: Real

floor

floor(Real x)

## Arguments

x
The value.

Argument type: pass by const reference
Value type: Real

fnBiogeoDE

## Usage

fnBiogeoDE(RateGenerator gainLossRates, Simplex rootFrequencies, GeographyRateModifier geoRateMod, Natural numAreas, Bool forbidExtinction, RealPos|RealPos[] branchRates)

## Arguments

gainLossRates

Argument type: pass by const reference
Value type: RateGenerator

rootFrequencies

Argument type: pass by const reference
Value type: Simplex
Default value [ 0.5, 0.5 ]

geoRateMod

Argument type: pass by const reference
Value type: GeographyRateModifier
Default value NULL

numAreas

Argument type: pass by const reference
Value type: Natural

forbidExtinction

Argument type: pass by const reference
Value type: Bool
Default value true

branchRates

Argument type: pass by const reference
Value type: RealPos
Default value 1

fnBiogeoGRM

## Usage

fnBiogeoGRM(RlAtlas atlas, Real distancePower, Bool useDistances, Bool useAvailable)

## Arguments

atlas

Argument type: pass by const reference
Value type: RlAtlas

distancePower

Argument type: pass by const reference
Value type: Real
Default value 1e-05

useDistances

Argument type: pass by const reference
Value type: Bool
Default value true

useAvailable

Argument type: pass by const reference
Value type: Bool
Default value false

fnBlosum62

fnBlosum62()

fnChromosomes

## Usage

fnChromosomes(Natural maxChromosomes, RealPos lambda, RealPos delta, RealPos rho, RealPos mu, RealPos lambda_l, RealPos delta_l)

## Arguments

maxChromosomes

Argument type: pass by const reference
Value type: Natural

lambda

Argument type: pass by const reference
Value type: RealPos
Default value 0

delta

Argument type: pass by const reference
Value type: RealPos
Default value 0

rho

Argument type: pass by const reference
Value type: RealPos
Default value 0

mu

Argument type: pass by const reference
Value type: RealPos
Default value 0

lambda_l

Argument type: pass by const reference
Value type: RealPos
Default value 0

delta_l

Argument type: pass by const reference
Value type: RealPos
Default value 0

## Usage

fnCladoProbs(Simplex eventProbs, Natural numCharacters, Natural numStates)

## Arguments

eventProbs
The probabilities of the different event types.

Argument type: pass by const reference
Value type: Simplex

numCharacters
The number of characters.

Argument type: pass by value
Value type: Natural

numStates
The number of states,

Argument type: pass by value
Value type: Natural

fnCoala

## Usage

fnCoala(Real[] coordinates, MatrixReal corAnalysis, RealPos[] weights)

## Arguments

coordinates
A vector of coordinates.

Argument type: pass by const reference
Value type: Real[]

corAnalysis
A correspondence analysis object.

Argument type: pass by value
Value type: MatrixReal

weights
A vector of weight for the coordinates.

Argument type: pass by value
Value type: RealPos[]

fnCpRev

fnCpRev()

fnDECRateMatrix

## Usage

fnDECRateMatrix(RealPos[][] dispersalRates, RealPos[] extirpationRates, Simplex rangeSize)

## Arguments

dispersalRates
Matrix of dispersal rates between areas.

Argument type: pass by const reference
Value type: RealPos[][]

extirpationRates
The per are extinction rates.

Argument type: pass by const reference
Value type: RealPos[]

rangeSize
Range size ...

Argument type: pass by value
Value type: Simplex

fnDECRates

## Usage

fnDECRates(RealPos[][] dispersalRates, RealPos[] extinctionRates, Natural maxRangeSize)

## Arguments

dispersalRates

Argument type: pass by const reference
Value type: RealPos[][]

extinctionRates

Argument type: pass by const reference
Value type: RealPos[]

maxRangeSize

Argument type: pass by value
Value type: Natural
Default value 2147483647

fnDECRoot

## Usage

fnDECRoot(RealPos[] rootFreqs, Simplex rangeSize)

## Arguments

rootFreqs

Argument type: pass by const reference
Value type: RealPos[]

rangeSize

Argument type: pass by value
Value type: Simplex
Default value NULL

fnDayhoff

fnDayhoff()

fnDecompVarCovar

## Usage

fnDecompVarCovar(RealPos[] standardDeviations, MatrixReal correlationCoefficients)

## Arguments

standardDeviations
A vector of standard deviations.

Argument type: pass by const reference
Value type: RealPos[]

correlationCoefficients
A matrix of correlation coefficients.

Argument type: pass by const reference
Value type: MatrixReal

## Name

fnDiscretizeDistribution

## Usage

fnDiscretizeDistribution(ContinuousDistribution G0, Integer num_cats)

## Arguments

G0
The distribution to discretize.

Argument type: pass by const reference
Value type: ContinuousDistribution

num_cats
The number of categories into which this distribution is categorize.

Argument type: pass by value
Value type: Integer

## Name

fnDiscretizeGamma

## Usage

fnDiscretizeGamma(RealPos shape, RealPos rate, Integer numCats, Bool median)

## Arguments

shape
The shape parameter of the gamma distribution.

Argument type: pass by const reference
Value type: RealPos

rate
The rate parameter (rate = 1/scale) of the gamma distribution

Argument type: pass by const reference
Value type: RealPos

numCats
The number of categories.

Argument type: pass by value
Value type: Integer

median
Should we use the median or mean?

Argument type: pass by value
Value type: Bool
Default value false

## Name

fnDppConcFromMean

## Usage

fnDppConcFromMean(RealPos numCats, Natural numElements)

## Arguments

numCats
Number of Categories of the DPP.

Argument type: pass by value
Value type: RealPos

numElements
Total number of elements.

Argument type: pass by value
Value type: Natural

## Name

fnDppMeanFromConc

## Usage

fnDppMeanFromConc(RealPos concentration, RealPos numElements)

## Arguments

concentration
The concentration parameter of the DPP.

Argument type: pass by value
Value type: RealPos

numElements
The number of elements of the DPP.

Argument type: pass by value
Value type: RealPos

fnEpoch

## Usage

fnEpoch(RateGenerator[] Q, RealPos[] times, RealPos[] rates)

## Arguments

Q
The per epoch rate matrices

Argument type: pass by const reference
Value type: RateGenerator[]

times
The times of the epochs.

Argument type: pass by const reference
Value type: RealPos[]

rates
The rate multipliers per epoch.

Argument type: pass by const reference
Value type: RealPos[]

fnF81

## Usage

fnF81(Simplex baseFrequencies)

## Arguments

baseFrequencies
The stationary frequencies of the states.

Argument type: pass by const reference
Value type: Simplex

fnFreeBinary

## Usage

fnFreeBinary(RealPos[] transitionRates)

## Arguments

transitionRates
The transition rates between the two states.

Argument type: pass by const reference
Value type: RealPos[]

fnFreeK

## Usage

fnFreeK(Simplex transitionRates)

## Arguments

transitionRates
Transition rates between states.

Argument type: pass by const reference
Value type: Simplex

## Name

fnFreeSymmetricRateMatrix

## Usage

fnFreeSymmetricRateMatrix(RealPos[] transitionRates, Bool rescaled)

## Arguments

transitionRates
The transition rates between states.

Argument type: pass by const reference
Value type: RealPos[]

rescaled
Should the matrix be normalized?

Argument type: pass by value
Value type: Bool

fnGTR

## Usage

fnGTR(Simplex exchangeRates, Simplex baseFrequencies)

## Arguments

exchangeRates
The exchangeability rates between states.

Argument type: pass by const reference
Value type: Simplex

baseFrequencies
The stationary frequencies of the states.

Argument type: pass by const reference
Value type: Simplex

fnHKY

## Usage

fnHKY(RealPos kappa, Simplex baseFrequencies)

## Arguments

kappa
The transition-transversion rate ratio.

Argument type: pass by const reference
Value type: RealPos

baseFrequencies
The stationary frequencies.

Argument type: pass by const reference
Value type: Simplex

fnInfiniteSites

## Usage

fnInfiniteSites(Natural numStates)

## Arguments

numStates
The number of states.

Argument type: pass by value
Value type: Natural
Default value 2

fnJC

## Usage

fnJC(Natural numStates)

## Arguments

numStates
The number of state or state space.

Argument type: pass by value
Value type: Natural

fnJones

fnJones()

fnK80

## Usage

fnK80(RealPos kappa)

## Arguments

kappa
The transition/transversion rate.

Argument type: pass by const reference
Value type: RealPos

fnLnProbability

## Usage

fnLnProbability(Real x)

## Arguments

x
The value.

Argument type: pass by reference
Value type: Real

fnMtMam

fnMtMam()

fnMtRev

fnMtRev()

## Name

fnNormalizedQuantile

## Usage

fnNormalizedQuantile(Distribution__Real contDistribution, Integer numCategories)

## Arguments

contDistribution
The distribution which we discretize.

Argument type: pass by const reference
Value type: Distribution__Real

numCategories
How many discrete categories?

Argument type: pass by const reference
Value type: Integer

## Name

fnNumUniqueInVector

## Usage

fnNumUniqueInVector(Real[] vector)

## Arguments

vector
The vector of values.

Argument type: pass by const reference
Value type: Real[]

fnPD

## Usage

fnPD(Tree tree, Clade sample, Bool includeRoot, RealPos[] weights)

## Arguments

tree

Argument type: pass by const reference
Value type: Tree

sample

Argument type: pass by value

includeRoot

Argument type: pass by value
Value type: Bool
Default value false

weights

Argument type: pass by value
Value type: RealPos[]
Default value [ ]

fnPattersonsD

## Usage

fnPattersonsD(String p1, String p2, String p3, String outgroup, AbstractHomologousDiscreteCharacterData data)

## Arguments

p1

Argument type: pass by value
Value type: String

p2

Argument type: pass by value
Value type: String

p3

Argument type: pass by value
Value type: String

outgroup

Argument type: pass by value
Value type: String

data

Argument type: pass by const reference
Value type: AbstractHomologousDiscreteCharacterData

fnPomo

## Usage

fnPomo(RateGenerator mutationRates, Real[] fitness, Natural virtualNe)

## Arguments

mutationRates

Argument type: pass by const reference
Value type: RateGenerator

fitness

Argument type: pass by const reference
Value type: Real[]

virtualNe

Argument type: pass by const reference
Value type: Natural

fnRtRev

fnRtRev()

## Name

fnSegregatingSites

## Usage

fnSegregatingSites(AbstractHomologousDiscreteCharacterData data)

## Arguments

data
The alignment for which to compute the number of segregating sites.

Argument type: pass by const reference
Value type: AbstractHomologousDiscreteCharacterData

fnStirling

## Usage

fnStirling(String kind {valid options: "first"|"lnFirst"|"second"} , Natural n, Natural k)

## Arguments

kind
The type of the stirling number to compute.

Argument type: pass by value
Value type: String

Options
first
lnFirst
second

Default value "first"

n

Argument type: pass by value
Value type: Natural

k

Argument type: pass by value
Value type: Natural

fnT92

## Usage

fnT92(RealPos kappa, Probability gc)

## Arguments

kappa
The transition-tranversion rate ratio.

Argument type: pass by const reference
Value type: RealPos

gc
The frequency of GC.

Argument type: pass by const reference
Value type: Probability

fnTajimasD

## Usage

fnTajimasD(AbstractHomologousDiscreteCharacterData data)

## Arguments

data
The character data matrix.

Argument type: pass by const reference
Value type: AbstractHomologousDiscreteCharacterData

fnTajimasPi

## Usage

fnTajimasPi(AbstractHomologousDiscreteCharacterData data, Bool perSite)

## Arguments

data
The character data matrix for which to compute the summary.

Argument type: pass by const reference
Value type: AbstractHomologousDiscreteCharacterData

perSite
Is the statistic normalized per site?

Argument type: pass by const reference
Value type: Bool
Default value true

fnTreeAssembly

treeAssembly

## Usage

fnTreeAssembly(Tree topology, RealPos[] brlens)

## Arguments

topology
The tree topology variable.

Argument type: pass by const reference
Value type: Tree

brlens
The vector of branch lengths.

Argument type: pass by const reference
Value type: RealPos[]

## Name

fnTreePairwiseDistances

## Usage

fnTreePairwiseDistances(Tree tree)

## Arguments

tree

Argument type: pass by const reference
Value type: Tree

fnTreeScale

## Usage

fnTreeScale(RealPos scale, TimeTree tree, RealPos|RealPos[] tipAges)

## Arguments

scale
The multiplicator by which to scale the tree,

Argument type: pass by const reference
Value type: RealPos

tree
The tree which will be re-scaled.

Argument type: pass by const reference
Value type: TimeTree

tipAges
A vector of ages for the tips.

Argument type: pass by const reference
Value type: RealPos
Default value 1

fnVT

fnVT()

fnVarCovar

## Usage

fnVarCovar(RealPos[] standardDeviations, Real[] correlationCoefficients)

## Arguments

standardDeviations
The vector of standard deviations.

Argument type: pass by const reference
Value type: RealPos[]

correlationCoefficients
The correlation coefficients.

Argument type: pass by const reference
Value type: Real[]

fnWAG

fnWAG()

## Name

fnWattersonsTheta

## Usage

fnWattersonsTheta(AbstractHomologousDiscreteCharacterData data, Bool perSite)

## Arguments

data
The character data object.

Argument type: pass by const reference
Value type: AbstractHomologousDiscreteCharacterData

perSite
Should we normalize per site?

Argument type: pass by const reference
Value type: Bool
Default value true

Get a global option for RevBayes.

getOption

## Description

Get a global option for RevBayes.

## Usage

getOption(String key)

## Arguments

key
The key-identifier for the option.

Argument type: pass by value
Value type: String

## Details

Options are used to personalize RevBayes and are stored on the local machine. Currently this is rather experimental.

## Example

```# compute the absolute value of a real number
getOption("linewidth")

# let us set the linewidth to a new value
setOption("linewidth", 200)

# now let's check what the value is
getOption("linewidth")
```

## Author

Sebastian Hoehna

Get the current working directory which RevBayes uses.

getwd

## Description

Get the current working directory which RevBayes uses.

getwd()

## Example

```# get the current working directory
getwd()

# let us set a new working directory
setwd("~/Desktop")

# check the working directory again
getwd()
```

## Author

Sebastian Hoehna

If the expression is true, then the function returns the first value, otherwise the second value.

ifelse

## Description

If the expression is true, then the function returns the first value, otherwise the second value.

## Usage

ifelse(Bool condition, Real a, Real b)

## Arguments

condition
A variable representing the condition of the if-else statement.

Argument type: pass by const reference
Value type: Bool

a
The value if the statement is true.

Argument type: pass by const reference
Value type: Real

b
The value if the statement is false.

Argument type: pass by const reference
Value type: Real

## Details

The ifelse function is important when the value of a variable should deterministically change during an analysis depending on other variables. Standard if-else statements are not dynamically re-evaluated.

## Example

```a <- 1
b := ifelse( a == 1, 10, -10 )
b

a <- 2
b
```

Sebastian Hoehna

## Example

```license()
```

Sebastian Hoehna

ln

ln(RealPos x)

## Arguments

x
The value.

Argument type: pass by const reference
Value type: RealPos

log

## Usage

log(RealPos x, RealPos base)

## Arguments

x
A positive number.

Argument type: pass by const reference
Value type: RealPos

base
The base of the logarithm.

Argument type: pass by const reference
Value type: RealPos

logistic

logistic(Real x)

## Arguments

x
The value.

Argument type: pass by const reference
Value type: Real

Show the content of the workspace.

ls

## Description

Show the content of the workspace.

ls(Bool all)

## Arguments

all
Should we print all variables and functions including provided ones by RevBayes?

Argument type: pass by value
Value type: Bool
Default value false

## Details

The list functions shows all the variables in the current workspace. You can also see all the functions available if you use ls(all=TRUE)

## Example

```# now we have an empty workspace
ls()
# next wee add a variable
a <- 1
# and we can see it
ls()
```

Sebastian Hoehna

mapTree

## Usage

mapTree(TraceTree TraceTree, String file, Integer burnin)

## Arguments

TraceTree
The samples of trees from the posterior.

Argument type: pass by value
Value type: TraceTree

file
The name of the file where to store the tree.

Argument type: pass by value
Value type: String

burnin
The number of trees to discard as burnin.

Argument type: pass by value
Value type: Integer
Default value -1

max

max(Real[] x)

## Arguments

x
A vector of numbers.

Argument type: pass by const reference
Value type: Real[]

maximumTree

## Usage

maximumTree(TimeTree[] geneTrees)

## Arguments

geneTrees
The vector of trees from which to pick the maximum.

Argument type: pass by const reference
Value type: TimeTree[]

mean

mean(Real[] x)

## Arguments

x
A vector of numbers.

Argument type: pass by const reference
Value type: Real[]

min

min(Real[] x)

## Arguments

x
A vector of values.

Argument type: pass by const reference
Value type: Real[]

module

## Usage

module(String file, String namespace, RevObject ...)

## Arguments

file
Relative or absolute name of module file.

Argument type: pass by value
Value type: String

namespace
Namespace used to rescue variables from overwriting.

Argument type: pass by value
Value type: String
Default value NULL

Additinal variables passed into the module.

Argument type: pass by const reference
Value type: RevObject

mrcaIndex

## Arguments

tree
The tree which is used to compute the MRCA.

Argument type: pass by const reference
Value type: TimeTree

The clade for which the MRCA is searched.

Argument type: pass by value

normalize

## Usage

normalize(RealPos[] x, RealPos sum)

## Arguments

x
The vector of numbers.

Argument type: pass by const reference
Value type: RealPos[]

sum
The sum the vector will have after normalization.

Argument type: pass by const reference
Value type: RealPos
Default value 1

## Name

pBimodalLognormal

## Usage

pBimodalLognormal(Real x, Real mean1, Real mean2, RealPos sd1, RealPos sd2, Probability p)

## Arguments

x
The value for which to compute the probability.

Argument type: pass by const reference
Value type: Real

mean1
The mean (in log-space) of the first lognormal distribution.

Argument type: pass by const reference
Value type: Real

mean2
The mean (in log-space) of the second lognormal distribution.

Argument type: pass by const reference
Value type: Real

sd1
The standard deviation of the first lognormal distribution.

Argument type: pass by const reference
Value type: RealPos

sd2
The standard deviation of the secind lognormal distribution.

Argument type: pass by const reference
Value type: RealPos

p
The probability to belong to the first distribution.

Argument type: pass by const reference
Value type: Probability

pBimodalNormal

## Usage

pBimodalNormal(Real x, Real mean1, Real mean2, RealPos sd1, RealPos sd2, Probability p)

## Arguments

x
The value for which to compute the probability.

Argument type: pass by const reference
Value type: Real

mean1
Mean of the first normal distribution.

Argument type: pass by const reference
Value type: Real

mean2
Mean of the second normal distribution.

Argument type: pass by const reference
Value type: Real

sd1
Standard deviation of the first normal distributin.

Argument type: pass by const reference
Value type: RealPos

sd2
Standard deviation of the second normal distribution.

Argument type: pass by const reference
Value type: RealPos

p
Probability that the value belongs to the first normal distribution.

Argument type: pass by const reference
Value type: Probability

pNormal

## Usage

pNormal(Real x, Real mean, RealPos sd)

## Arguments

x
The value for which to compute the probability.

Argument type: pass by const reference
Value type: Real

mean
The mean parameter.

Argument type: pass by const reference
Value type: Real
Default value 0

sd
The standard deviation parameter.

Argument type: pass by const reference
Value type: RealPos
Default value 1

## Name

pSoftBoundUniformNormal

## Usage

pSoftBoundUniformNormal(Real x, Real min, Real max, RealPos sd, Probability p)

## Arguments

x
The value for which to compute the probability.

Argument type: pass by const reference
Value type: Real

min
The min value of the uniform distribution.

Argument type: pass by const reference
Value type: Real

max
The max value of the uniform distribution.

Argument type: pass by const reference
Value type: Real

sd
The standard deviation of the normal distribution.

Argument type: pass by const reference
Value type: RealPos

p
The probability of being within the uniform distribution.

Argument type: pass by const reference
Value type: Probability

pUniform

punif

## Usage

pUniform(Real x, Real lower, Real upper)

## Arguments

x
The value for which to compute the probability.

Argument type: pass by const reference
Value type: Real

lower
The lower bound.

Argument type: pass by const reference
Value type: Real

upper
The upper bound.

Argument type: pass by const reference
Value type: Real

pchisq

## Usage

pchisq(Real x, Natural df)

## Arguments

x
The value for which to compute the probability.

Argument type: pass by const reference
Value type: Real

df
The degrees of freedom.

Argument type: pass by const reference
Value type: Natural

pexponential

## Usage

pexponential(Real x, RealPos lambda)

## Arguments

x
The value for which to compute the probability.

Argument type: pass by const reference
Value type: Real

lambda
The rate ( rate==1/mean) parameter.

Argument type: pass by const reference
Value type: RealPos
Default value 1

pgamma

## Usage

pgamma(Real x, RealPos shape, RealPos rate)

## Arguments

x
The value for which to compute the probability.

Argument type: pass by const reference
Value type: Real

shape
The shape parameter.

Argument type: pass by const reference
Value type: RealPos

rate
The rate parameter (rate = 1/scale).

Argument type: pass by const reference
Value type: RealPos

plognormal

## Usage

plognormal(Real x, Real mean, RealPos sd)

## Arguments

x
The value for which to compute the probability.

Argument type: pass by const reference
Value type: Real

mean
The mean in log-space (observed mean is exp(m)).

Argument type: pass by const reference
Value type: Real

sd
The standard deviation in log-space.

Argument type: pass by const reference
Value type: RealPos

ploguniform

## Usage

ploguniform(Real x, RealPos min, RealPos max)

## Arguments

x
The value for which to compute the probability.

Argument type: pass by const reference
Value type: Real

min
The lower bound.

Argument type: pass by const reference
Value type: RealPos

max
The upper bound.

Argument type: pass by const reference
Value type: RealPos

pomoRF

## Usage

pomoRF(Simplex root_base_frequencies, Real root_polymorphism_proportion, RateGenerator mutation_rate_matrix, Natural virtualNe)

## Arguments

root_base_frequencies

Argument type: pass by const reference
Value type: Simplex

root_polymorphism_proportion

Argument type: pass by const reference
Value type: Real

mutation_rate_matrix

Argument type: pass by const reference
Value type: RateGenerator

virtualNe

Argument type: pass by const reference
Value type: Natural

pomoStateConvert

## Usage

pomoStateConvert(AbstractHomologousDiscreteCharacterData aln, Natural virtualNe, Taxon[] taxa)

## Arguments

aln

Argument type: pass by value
Value type: AbstractHomologousDiscreteCharacterData

virtualNe

Argument type: pass by value
Value type: Natural

taxa

Argument type: pass by value
Value type: Taxon[]

power

## Usage

power(Real base, Real exponent)

## Arguments

base
The base.

Argument type: pass by const reference
Value type: Real

exponent
The exponent.

Argument type: pass by const reference
Value type: Real

Print the seed of the random number generator.

printSeed

## Description

Print the seed of the random number generator.

printSeed()

## Example

```printSeed()

# Set the seed to a new value
seed(12345)
# Now print the seed again
printSeed()
```

Sebastian Hoehna

## Name

qBimodalLognormal

## Usage

qBimodalLognormal(Probability p, Real mean1, Real mean2, RealPos sd1, RealPos sd2, Probability p)

## Arguments

p
The probability for this quantile.

Argument type: pass by const reference
Value type: Probability

mean1
The mean (in log-space) of the first lognormal distribution.

Argument type: pass by const reference
Value type: Real

mean2
The mean (in log-space) of the second lognormal distribution.

Argument type: pass by const reference
Value type: Real

sd1
The standard deviation of the first lognormal distribution.

Argument type: pass by const reference
Value type: RealPos

sd2
The standard deviation of the secind lognormal distribution.

Argument type: pass by const reference
Value type: RealPos

p
The probability to belong to the first distribution.

Argument type: pass by const reference
Value type: Probability

qBimodalNormal

## Usage

qBimodalNormal(Probability p, Real mean1, Real mean2, RealPos sd1, RealPos sd2, Probability p)

## Arguments

p
The probability (i.e., quantile) of the distribution.

Argument type: pass by const reference
Value type: Probability

mean1
Mean of the first normal distribution.

Argument type: pass by const reference
Value type: Real

mean2
Mean of the second normal distribution.

Argument type: pass by const reference
Value type: Real

sd1
Standard deviation of the first normal distributin.

Argument type: pass by const reference
Value type: RealPos

sd2
Standard deviation of the second normal distribution.

Argument type: pass by const reference
Value type: RealPos

p
Probability that the value belongs to the first normal distribution.

Argument type: pass by const reference
Value type: Probability

qNormal

## Usage

qNormal(Probability p, Real mean, RealPos sd)

## Arguments

p
The probability (i.e., quantile) of the distribution.

Argument type: pass by const reference
Value type: Probability

mean
The mean parameter.

Argument type: pass by const reference
Value type: Real
Default value 0

sd
The standard deviation parameter.

Argument type: pass by const reference
Value type: RealPos
Default value 1

## Name

qSoftBoundUniformNormal

## Usage

qSoftBoundUniformNormal(Probability p, Real min, Real max, RealPos sd, Probability p)

## Arguments

p
The probability (i.e., quantile) of the distribution.

Argument type: pass by const reference
Value type: Probability

min
The min value of the uniform distribution.

Argument type: pass by const reference
Value type: Real

max
The max value of the uniform distribution.

Argument type: pass by const reference
Value type: Real

sd
The standard deviation of the normal distribution.

Argument type: pass by const reference
Value type: RealPos

p
The probability of being within the uniform distribution.

Argument type: pass by const reference
Value type: Probability

qUniform

## Usage

qUniform(Probability p, Real lower, Real upper)

## Arguments

p
The probability (i.e., quantile) of the distribution.

Argument type: pass by const reference
Value type: Probability

lower
The lower bound.

Argument type: pass by const reference
Value type: Real

upper
The upper bound.

Argument type: pass by const reference
Value type: Real

qchisq

## Usage

qchisq(Probability p, Natural df)

## Arguments

p
The probability for this quantile.

Argument type: pass by const reference
Value type: Probability

df
The degrees of freedom.

Argument type: pass by const reference
Value type: Natural

qexponential

## Usage

qexponential(Probability p, RealPos lambda)

## Arguments

p
The probability for this quantile.

Argument type: pass by const reference
Value type: Probability

lambda
The rate ( rate==1/mean) parameter.

Argument type: pass by const reference
Value type: RealPos
Default value 1

qgamma

## Usage

qgamma(Probability p, RealPos shape, RealPos rate)

## Arguments

p
The probability for this quantile.

Argument type: pass by const reference
Value type: Probability

shape
The shape parameter.

Argument type: pass by const reference
Value type: RealPos

rate
The rate parameter (rate = 1/scale).

Argument type: pass by const reference
Value type: RealPos

qlognormal

## Usage

qlognormal(Probability p, Real mean, RealPos sd)

## Arguments

p
The probability for this quantile.

Argument type: pass by const reference
Value type: Probability

mean
The mean in log-space (observed mean is exp(m)).

Argument type: pass by const reference
Value type: Real

sd
The standard deviation in log-space.

Argument type: pass by const reference
Value type: RealPos

qloguniform

## Usage

qloguniform(Probability p, RealPos min, RealPos max)

## Arguments

p
The probability for this quantile.

Argument type: pass by const reference
Value type: Probability

min
The lower bound.

Argument type: pass by const reference
Value type: RealPos

max
The upper bound.

Argument type: pass by const reference
Value type: RealPos

Terminates the currently running instance of RevBayes.

quit

q

## Description

Terminates the currently running instance of RevBayes.

quit()

## Example

```# if you really want to quit
q()
# you can always start again later ...
```

Sebastian Hoehna

rBDPTopology

## Usage

rBDPTopology(Natural n, RealPos lambda, RealPos mu, RealPos origin, RealPos rootAge, Probability rho, String samplingStrategy {valid options: "uniform"|"diversified"} , String condition {valid options: "time"|"survival"|"nTaxa"} , Taxon[] taxa)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

lambda
The constant speciation rate.

Argument type: pass by const reference
Value type: RealPos

mu
The constant extinction rate.

Argument type: pass by const reference
Value type: RealPos
Default value 0

origin
The time of the process starting at the origin, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rootAge
The time of the process starting at the root, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rho
The taxon sampling probability.

Argument type: pass by const reference
Value type: Probability
Default value 1

samplingStrategy
The sampling strategy of including taxa at the present.

Argument type: pass by value
Value type: String

Options
uniform
diversified

Default value "uniform"

condition
The condition of the process.

Argument type: pass by value
Value type: String

Options
time
survival
nTaxa

Default value "survival"

taxa
The taxa used for initialization.

Argument type: pass by const reference
Value type: Taxon[]
Default value NULL

## Name

rBimodalLognormal

## Usage

rBimodalLognormal(Natural n, Real mean1, Real mean2, RealPos sd1, RealPos sd2, Probability p)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

mean1
The mean (in log-space) of the first lognormal distribution.

Argument type: pass by const reference
Value type: Real

mean2
The mean (in log-space) of the second lognormal distribution.

Argument type: pass by const reference
Value type: Real

sd1
The standard deviation of the first lognormal distribution.

Argument type: pass by const reference
Value type: RealPos

sd2
The standard deviation of the secind lognormal distribution.

Argument type: pass by const reference
Value type: RealPos

p
The probability to belong to the first distribution.

Argument type: pass by const reference
Value type: Probability

rBimodalNormal

## Usage

rBimodalNormal(Natural n, Real mean1, Real mean2, RealPos sd1, RealPos sd2, Probability p)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

mean1
Mean of the first normal distribution.

Argument type: pass by const reference
Value type: Real

mean2
Mean of the second normal distribution.

Argument type: pass by const reference
Value type: Real

sd1
Standard deviation of the first normal distributin.

Argument type: pass by const reference
Value type: RealPos

sd2
Standard deviation of the second normal distribution.

Argument type: pass by const reference
Value type: RealPos

p
Probability that the value belongs to the first normal distribution.

Argument type: pass by const reference
Value type: Probability

rBirthDeath

rBDP

## Usage

rBirthDeath(Natural n, RealPos lambda, RealPos mu, RealPos origin, RealPos rootAge, Probability rho, String samplingStrategy {valid options: "uniform"|"diversified"} , String condition {valid options: "time"|"survival"|"nTaxa"} , Taxon[] taxa)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

lambda
The constant speciation rate.

Argument type: pass by const reference
Value type: RealPos

mu
The constant extinction rate.

Argument type: pass by const reference
Value type: RealPos
Default value 0

origin
The time of the process starting at the origin, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rootAge
The time of the process starting at the root, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rho
The taxon sampling probability.

Argument type: pass by const reference
Value type: Probability
Default value 1

samplingStrategy
The sampling strategy of including taxa at the present.

Argument type: pass by value
Value type: String

Options
uniform
diversified

Default value "uniform"

condition
The condition of the process.

Argument type: pass by value
Value type: String

Options
time
survival
nTaxa

Default value "survival"

taxa
The taxa used for initialization.

Argument type: pass by const reference
Value type: Taxon[]
Default value NULL

## Name

rBirthDeathMultiRate

## Usage

rBirthDeathMultiRate(Natural n, RealPos origin, RealPos rootAge, Probability rho, RealPos[] lambda, RealPos[] mu, RateGenerator Q, RealPos rate, Simplex pi, String condition {valid options: "time"|"survival"} , Taxon[] taxa)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

origin
The origin of the process.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rootAge
The root age.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rho
The taxon-sampling probability.

Argument type: pass by const reference
Value type: Probability
Default value 1

lambda
Vector of speciation rates per rate category.

Argument type: pass by const reference
Value type: RealPos[]

mu
Vector of extinction rates per rate category.

Argument type: pass by const reference
Value type: RealPos[]

Q
Rate matrix of transition rates between diversification-rate categories.

Argument type: pass by const reference
Value type: RateGenerator

rate
Global rate of transition between rate categories.

Argument type: pass by const reference
Value type: RealPos

pi
State frequencies at the root.

Argument type: pass by const reference
Value type: Simplex

condition
The condition of the birth-death process.

Argument type: pass by value
Value type: String

Options
time
survival

Default value "survival"

taxa
The taxon names used for initialization.

Argument type: pass by value
Value type: Taxon[]

rCoalescent

## Usage

rCoalescent(Natural n, RealPos theta, String[] names, Clade[] constraints)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

theta
The constant population size.

Argument type: pass by const reference
Value type: RealPos

names
The taxon names used when drawing a random tree.

Argument type: pass by value
Value type: String[]

constraints
The topological constraints strictly enforced.

Argument type: pass by value
Default value [ ]

## Name

rCoalescentSkyline

## Usage

rCoalescentSkyline(Natural n, RealPos[] theta, RealPos[] times, String method {valid options: "events"|"uniform"|"specified"} , String[] names, Clade[] constraints)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

theta
A vector of per interval population sizes.

Argument type: pass by const reference
Value type: RealPos[]

times
A vector of times for the intervals, if applicable.

Argument type: pass by const reference
Value type: RealPos[]
Default value NULL

method
The method how intervals are defined.

Argument type: pass by value
Value type: String

Options
events
uniform
specified

Default value "events"

names
The names of the taxa used for simulation.

Argument type: pass by value
Value type: String[]

constraints
The strictly enforced topology constraints.

Argument type: pass by value
Default value [ ]

rDPP

## Usage

rDPP(Natural n, RealPos concentration, Distribution__Real baseDistribution, Natural numElements)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

concentration
The concentration parameter.

Argument type: pass by const reference
Value type: RealPos

baseDistribution
The base distribution for the per category values.

Argument type: pass by const reference
Value type: Distribution__Real

numElements
The number of elements drawn from this distribution.

Argument type: pass by value
Value type: Natural

## Name

rDecomposedInvWishart

## Usage

rDecomposedInvWishart(Natural n, MatrixRealSymmetric sigma, RealPos[] diagonal, Natural df, RealPos kappa, Natural dim)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

sigma

Argument type: pass by const reference
Value type: MatrixRealSymmetric
Default value [ [ 0.0000 ] ]

diagonal

Argument type: pass by const reference
Value type: RealPos[]
Default value [ ]

df

Argument type: pass by const reference
Value type: Natural
Default value 0

kappa

Argument type: pass by const reference
Value type: RealPos
Default value 0

dim

Argument type: pass by const reference
Value type: Natural
Default value 0

## Name

rDiversityDependentYule

## Usage

rDiversityDependentYule(Natural n, RealPos lambda, Natural capacity, RealPos origin, RealPos rootAge, String condition {valid options: "time"|"survival"|"nTaxa"} , Taxon[] taxa)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

lambda
The initial speciation rate.

Argument type: pass by const reference
Value type: RealPos

capacity
The carrying capacity.

Argument type: pass by const reference
Value type: Natural

origin
The time of the process since the origin, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rootAge
The time of the process since the root, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

condition
The condition of the process.

Argument type: pass by value
Value type: String

Options
time
survival
nTaxa

Default value "survival"

taxa
The names of the taxa used for simulation.

Argument type: pass by value
Value type: Taxon[]

rEmpiricalTree

## Usage

rEmpiricalTree(Natural n, Natural burnin, TraceTree TraceTree)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

burnin
The number of samples to discard.

Argument type: pass by value
Value type: Natural

TraceTree
The trace of tree samples.

Argument type: pass by value
Value type: TraceTree

## Name

rFossilBirthDeath

rFBDP

## Usage

rFossilBirthDeath(Natural n, RealPos lambda, RealPos mu, RealPos psi, RealPos origin, RealPos rootAge, Probability rho, String samplingStrategy {valid options: "uniform"|"diversified"} , String condition {valid options: "time"|"survival"|"nTaxa"} , Taxon[] taxa)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

lambda
The constant speciation rate.

Argument type: pass by const reference
Value type: RealPos

mu
The constant extinction rate.

Argument type: pass by const reference
Value type: RealPos
Default value 0

psi
The constant fossilization rate.

Argument type: pass by const reference
Value type: RealPos
Default value 0

origin
The time of the process starting at the origin, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rootAge
The time of the process starting at the root, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rho
The taxon sampling probability.

Argument type: pass by const reference
Value type: Probability
Default value 1

samplingStrategy
The sampling strategy of including taxa at the present.

Argument type: pass by value
Value type: String

Options
uniform
diversified

Default value "uniform"

condition
The condition of the process.

Argument type: pass by value
Value type: String

Options
time
survival
nTaxa

Default value "survival"

taxa
The taxa used for initialization.

Argument type: pass by const reference
Value type: Taxon[]
Default value NULL

rInverseWishart

rinvWishart

## Usage

rInverseWishart(Natural n, MatrixRealSymmetric sigma, RealPos[] diagonal, Natural df, RealPos kappa, Natural dim)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

sigma

Argument type: pass by const reference
Value type: MatrixRealSymmetric
Default value NULL

diagonal

Argument type: pass by const reference
Value type: RealPos[]
Default value NULL

df

Argument type: pass by const reference
Value type: Natural
Default value NULL

kappa

Argument type: pass by const reference
Value type: RealPos
Default value NULL

dim

Argument type: pass by const reference
Value type: Natural
Default value NULL

rMixture

## Usage

rMixture(Natural n, Real[] values, Simplex probabilities)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

values
The potential values.

Argument type: pass by const reference
Value type: Real[]

probabilities
The probabilitoes for each value.

Argument type: pass by const reference
Value type: Simplex

## Name

rMultiSpeciesCoalescent

## Usage

rMultiSpeciesCoalescent(Natural n, TimeTree speciesTree, RealPos|RealPos[] Ne, Taxon[] taxa)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

speciesTree
The species in which the gene trees evolve.

Argument type: pass by const reference
Value type: TimeTree

Ne
The population sizes.

Argument type: pass by const reference
Value type: RealPos

taxa
The vector of taxa which have species and individual names.

Argument type: pass by value
Value type: Taxon[]

## Name

rMultivariateNormal

## Usage

rMultivariateNormal(Natural n, Real[] mean, MatrixRealSymmetric covariance, MatrixRealSymmetric precision, RealPos scale)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

mean
The vector of mean values.

Argument type: pass by const reference
Value type: Real[]

covariance
The variance-covariance matrix.

Argument type: pass by const reference
Value type: MatrixRealSymmetric
Default value NULL

precision
The precision matrix.

Argument type: pass by const reference
Value type: MatrixRealSymmetric
Default value NULL

scale
The scaling factor of the variance matrix.

Argument type: pass by const reference
Value type: RealPos
Default value 1

rNormal

## Usage

rNormal(Natural n, Real mean, RealPos sd)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

mean
The mean parameter.

Argument type: pass by const reference
Value type: Real
Default value 0

sd
The standard deviation parameter.

Argument type: pass by const reference
Value type: RealPos
Default value 1

## Name

rOrnsteinUhlenbeck

rOU

## Usage

rOrnsteinUhlenbeck(Natural n, Real x0, Real theta, RealPos alpha, RealPos sigma, RealPos time)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

x0
The root parameter value.

Argument type: pass by const reference
Value type: Real

theta
The location of the optimum parameter.

Argument type: pass by const reference
Value type: Real

alpha
The attraction to the optimum parameter.

Argument type: pass by const reference
Value type: RealPos

sigma
The scaling parameter of the time.

Argument type: pass by const reference
Value type: RealPos

time
The duration of the process.

Argument type: pass by const reference
Value type: RealPos

rPhyloBrownian

rPhyloBM

## Usage

rPhyloBrownian(Natural n, TimeTree tree, RealPos sigma, Real drift)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

tree
The tree along which the continuous character evolves.

Argument type: pass by const reference
Value type: TimeTree

sigma
The branch-length multiplier to scale the variance of the Brownian motion.

Argument type: pass by const reference
Value type: RealPos

drift
The drift parameter of the Brownian motion.

Argument type: pass by const reference
Value type: Real
Default value 0

## Name

rPhyloBrownianMVN

## Usage

rPhyloBrownianMVN(Natural n, Tree tree, RealPos|RealPos[] branchRates, RealPos|RealPos[] siteRates, Real|Real[] rootStates, Natural nSites)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

tree
The tree along which the character evolves.

Argument type: pass by const reference
Value type: Tree

branchRates
The rate of evolution along a branch.

Argument type: pass by const reference
Value type: RealPos
Default value 1

siteRates
The rate of evolution per site.

Argument type: pass by const reference
Value type: RealPos
Default value 1

rootStates
The vector of root states.

Argument type: pass by const reference
Value type: Real
Default value 0

nSites
The number of sites which is used for the initialized (random draw) from this distribution.

Argument type: pass by value
Value type: Natural
Default value 10

## Name

rPhyloBrownianMultiVariate

## Usage

rPhyloBrownianMultiVariate(Natural n, TimeTree tree, MatrixRealSymmetric sigma)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

tree
The tree along which the process evolves.

Argument type: pass by const reference
Value type: TimeTree

sigma
The variance-covariance matrix.

Argument type: pass by const reference
Value type: MatrixRealSymmetric

## Name

rPhyloBrownianREML

## Usage

rPhyloBrownianREML(Natural n, Tree tree, RealPos|RealPos[] branchRates, RealPos|RealPos[] siteRates, Natural nSites)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

tree
The tree along which the process evolves.

Argument type: pass by const reference
Value type: Tree

branchRates
The per branch rate-multiplier(s).

Argument type: pass by const reference
Value type: RealPos
Default value 1

siteRates
The per site rate-multiplier(s).

Argument type: pass by const reference
Value type: RealPos
Default value 1

nSites
The number of sites used for simulation.

Argument type: pass by value
Value type: Natural
Default value 10

## Name

rPhyloDistanceGamma

## Usage

rPhyloDistanceGamma(Natural n, Tree tree, RlDistanceMatrix distanceMatrix, RlDistanceMatrix varianceMatrix, String[] names)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

tree

Argument type: pass by const reference
Value type: Tree

distanceMatrix

Argument type: pass by const reference
Value type: RlDistanceMatrix

varianceMatrix

Argument type: pass by const reference
Value type: RlDistanceMatrix

names

Argument type: pass by value
Value type: String[]

## Name

rPhyloOrnsteinUhlenbeck

rPhyloOU

## Usage

rPhyloOrnsteinUhlenbeck(Natural n)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

rPhyloWhiteNoise

## Usage

rPhyloWhiteNoise(Natural n, TimeTree tree, RealPos sigma)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

tree
The tree along which the process evolves.

Argument type: pass by const reference
Value type: TimeTree

sigma
The standard deviation.

Argument type: pass by const reference
Value type: RealPos

rPoisson

## Usage

rPoisson(Natural n, RealPos lambda)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

lambda
The rate (rate = 1/mean) parameter.

Argument type: pass by const reference
Value type: RealPos

## Name

rReversibleJumpMixture

rRJMixture

## Usage

rReversibleJumpMixture(Natural n, Real constantValue, Distribution__Real baseDistribution, Probability p)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

constantValue
The fixed value this distribution can take.

Argument type: pass by const reference
Value type: Real

baseDistribution
The distribution from which the value is alternatively drawn.

Argument type: pass by const reference
Value type: Distribution__Real

p
The probability of being the fixed value.

Argument type: pass by const reference
Value type: Probability

## Name

rSoftBoundUniformNormal

## Usage

rSoftBoundUniformNormal(Natural n, Real min, Real max, RealPos sd, Probability p)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

min
The min value of the uniform distribution.

Argument type: pass by const reference
Value type: Real

max
The max value of the uniform distribution.

Argument type: pass by const reference
Value type: Real

sd
The standard deviation of the normal distribution.

Argument type: pass by const reference
Value type: RealPos

p
The probability of being within the uniform distribution.

Argument type: pass by const reference
Value type: Probability

rUniform

runif

## Usage

rUniform(Natural n, Real lower, Real upper)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

lower
The lower bound.

Argument type: pass by const reference
Value type: Real

upper
The upper bound.

Argument type: pass by const reference
Value type: Real

rUniformTimeTree

## Usage

rUniformTimeTree(Natural n, RealPos rootAge, Taxon[] taxa)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

rootAge
The age of the root.

Argument type: pass by const reference
Value type: RealPos

taxa
The taxa used for simulation.

Argument type: pass by value
Value type: Taxon[]

rUniformTopology

## Usage

rUniformTopology(Natural n, Taxon[] taxa, Clade[] constraints)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

taxa
The vector of taxa that will be used for the tips.

Argument type: pass by const reference
Value type: Taxon[]
Default value NULL

constraints
The topological constraints that will be enforced.

Argument type: pass by value
Default value NULL

rWishart

## Usage

rWishart(Natural n, Natural df, RealPos kappa, Natural dim)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

df
The degrees of dreedom.

Argument type: pass by const reference
Value type: Natural

kappa
The scaling parameter.

Argument type: pass by const reference
Value type: RealPos

dim
The dimension of the distribution.

Argument type: pass by const reference
Value type: Natural

Create a sequence of number in the given range (interval).

range

## Description

Create a sequence of number in the given range (interval).

## Usage

range(Integer first, Integer last)

## Arguments

first
Lower value.

Argument type: pass by value
Value type: Integer

last
Upper value.

Argument type: pass by value
Value type: Integer

## Details

This function is a simplified version of the sequence function 'seq'. The range function creates a sequence of integer numbers with a step size of 1.

## Example

```range(1,20)
range(20,-20)

# this function is actually the same as the ':'
20:-20
```

Sebastian Hoehna

rbernoulli

## Usage

rbernoulli(Natural n, Probability p)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

p
The probability of success.

Argument type: pass by const reference
Value type: Probability

rbeta

## Usage

rbeta(Natural n, RealPos alpha, RealPos beta)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

alpha
The alpha shape parameter.

Argument type: pass by const reference
Value type: RealPos

beta
The beta shape parameter.

Argument type: pass by const reference
Value type: RealPos

rbinomial

## Usage

rbinomial(Natural n, Probability p, Natural n)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

p
Probability of success.

Argument type: pass by const reference
Value type: Probability

n
Number of trials.

Argument type: pass by const reference
Value type: Natural

rcategorical

rcat

## Usage

rcategorical(Natural n, Simplex p)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

p
The probability for each category.

Argument type: pass by const reference
Value type: Simplex

rchisq

## Usage

rchisq(Natural n, Natural df)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

df
The degrees of freedom.

Argument type: pass by const reference
Value type: Natural

rcppNormal

## Usage

rcppNormal(Natural n, RealPos lambda, Real mu, RealPos sigma)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

lambda
The rate of the Poisson distribution.

Argument type: pass by const reference
Value type: RealPos

mu
The mean of the normal distribution

Argument type: pass by const reference
Value type: Real

sigma
The standard deviation of the normal distribution

Argument type: pass by const reference
Value type: RealPos

rdirichlet

## Usage

rdirichlet(Natural n, RealPos[] alpha)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

alpha
The concentration parameter.

Argument type: pass by const reference
Value type: RealPos[]

## Arguments

file
The name of the file which holds the trace the trace

Argument type: pass by value
Value type: String

separator
The separater between sampled values.

Argument type: pass by value
Value type: String
Default value " "

## Usage

readAncestralStateTreeTrace(String file, String treetype {valid options: "clock"|"non-clock"} , String separator)

## Arguments

file
The name of the file.

Argument type: pass by value
Value type: String

treetype
The type of tree.

Argument type: pass by value
Value type: String

Options
clock
non-clock

Default value "clock"

separator
The separater/delimiter between values.

Argument type: pass by value
Value type: String
Default value " "

## Arguments

file
The name of the file.

Argument type: pass by value
Value type: String

## Arguments

file
The name of the file.

Argument type: pass by value
Value type: String

## Arguments

file
File or directory names where to find the character data.

Argument type: pass by value
Value type: String

alwaysReturnAsVector
Should the value be returned as a vector even it is only a single matrix?

Argument type: pass by value
Value type: Bool
Default value false

## Arguments

file
The name of the file to read in.

Argument type: pass by value
Value type: String

type
The type of data.

Argument type: pass by value
Value type: String

delimiter
The delimiter between columns.

Argument type: pass by value
Value type: String
Default value " "

## Arguments

file
The name of the file or directory for the character data matrices.

Argument type: pass by value
Value type: String

alwaysReturnAsVector
Should we return this object as a vector even if it is just a single matrix?

Argument type: pass by value
Value type: Bool
Default value false

## Arguments

file
The name of the file or directory from which to read in the character data matrix.

Argument type: pass by value
Value type: String

alwaysReturnAsVector
Should we always return the character data matrix as a vector of matrices even if there is only one?

Argument type: pass by value
Value type: Bool
Default value false

## Arguments

file
Relative or absolute name of the file.

Argument type: pass by value
Value type: String

## Arguments

file
Relative or absolute name of the file.

Argument type: pass by value
Value type: String

## Arguments

file
The name of the file.

Argument type: pass by value
Value type: String

delimiter
The delimiter used between the output of variables.

Argument type: pass by value
Value type: String
Default value " "

## Arguments

filename
Relative or absolute file name.

Argument type: pass by value
Value type: String

delimiter
Delimiter between columns.

Argument type: pass by value
Value type: String
Default value " "

## Arguments

file
Name of the file.

Argument type: pass by value
Value type: String

delimiter
The delimiter between columns (e.g., the iteration number and the trees).

Argument type: pass by value
Value type: String
Default value " "

## Usage

readTreeTrace(String file, String treetype {valid options: "clock"|"non-clock"} , String separator)

## Arguments

file
The name of the tree trace file.

Argument type: pass by value
Value type: String

treetype
The type of trees.

Argument type: pass by value
Value type: String

Options
clock
non-clock

Default value "clock"

separator
The separator/delimiter between values in the file.

Argument type: pass by value
Value type: String
Default value " "

## Arguments

file
The name of the file containing the trees.

Argument type: pass by value
Value type: String

'rep' creates a vector of 'n' copies of the value 'x'.

rep

## Description

'rep' creates a vector of 'n' copies of the value 'x'.

## Usage

rep(Integer x, Natural n)

## Arguments

x
The value that we replicate.

Argument type: pass by value
Value type: Integer

n
How often we replicate the value.

Argument type: pass by value
Value type: Natural

## Details

'rep' creates a vector of 'n' elements, each with value 'x', preserving the type of 'x' in the returned vector.

## Example

```rep(0.1, 3)
```

Michael Landis

rexponential

rexp

## Usage

rexponential(Natural n, RealPos lambda)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

lambda
The rate ( rate==1/mean) parameter.

Argument type: pass by const reference
Value type: RealPos
Default value 1

rgamma

## Usage

rgamma(Natural n, RealPos shape, RealPos rate)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

shape
The shape parameter.

Argument type: pass by const reference
Value type: RealPos

rate
The rate parameter (rate = 1/scale).

Argument type: pass by const reference
Value type: RealPos

rgeometric

rgeom

## Usage

rgeometric(Natural n, Probability p)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

p
The probability of success.

Argument type: pass by const reference
Value type: Probability

rlognormal

rlnorm

## Usage

rlognormal(Natural n, Real mean, RealPos sd)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

mean
The mean in log-space (observed mean is exp(m)).

Argument type: pass by const reference
Value type: Real

sd
The standard deviation in log-space.

Argument type: pass by const reference
Value type: RealPos

rloguniform

## Usage

rloguniform(Natural n, RealPos min, RealPos max)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

min
The lower bound.

Argument type: pass by const reference
Value type: RealPos

max
The upper bound.

Argument type: pass by const reference
Value type: RealPos

rmultinomial

## Usage

rmultinomial(Natural n, Simplex p, Natural n)

## Arguments

n
Number of random values to draw.

Argument type: pass by value
Value type: Natural
Default value 1

p
The simplex of probabilities for the categories.

Argument type: pass by const reference
Value type: Simplex

n
The number of draws.

Argument type: pass by const reference
Value type: Natural

## Name

rootedTripletDist

## Usage

rootedTripletDist(Tree geneTrees, String[] speciesNames, Bool keepBranchLengths)

## Arguments

geneTrees

Argument type: pass by const reference
Value type: Tree

speciesNames

Argument type: pass by const reference
Value type: String[]

keepBranchLengths

Argument type: pass by const reference
Value type: Bool

round

round(Real x)

## Arguments

x
The value.

Argument type: pass by const reference
Value type: Real

seed

seed(Natural x)

## Arguments

x
The number used to seed the random number generator.

Argument type: pass by value
Value type: Natural

Create a sequence of values separate by a given step-size.

seq

## Description

Create a sequence of values separate by a given step-size.

## Usage

seq(Integer from, Integer to, Integer by)

## Arguments

from
The first value of the sequence.

Argument type: pass by value
Value type: Integer

to
The last value of the sequence.

Argument type: pass by value
Value type: Integer

by
The step-size between value.

Argument type: pass by value
Value type: Integer

## Details

The 'seq' function create a sequence of values, starting with the initial value and then adding the step-size to it until the value reaches the 'to'-value.

## Example

```seq(-0.5, 10.5, 2)
```

## Author

Sebastian Hoehna

Set a global option for RevBayes.

setOption

## Description

Set a global option for RevBayes.

## Usage

setOption(String key, String value)

## Arguments

key
The key-identifier for which to set a new value.

Argument type: pass by value
Value type: String

value
The new value.

Argument type: pass by value
Value type: String

## Details

Options are used to personalize RevBayes and are stored on the local machine. Currently this is rather experimental.

## Example

```# compute the absolute value of a real number
getOption("linewidth")

# let us set the linewidth to a new value
setOption("linewidth", 200)

# now let's check what the value is
getOption("linewidth")
```

## Author

Sebastian Hoehna

Set the current working directory which RevBayes uses.

setwd

## Description

Set the current working directory which RevBayes uses.

setwd(String wd)

## Arguments

wd
The new working directory.

Argument type: pass by value
Value type: String

## Example

```# get the current working directory
getwd()

# let us set a new working directory
setwd("~/Desktop")

# check the working directory again
getwd()
```

Sebastian Hoehna

simTree

## Usage

simTree(Natural numTaxa, String type {valid options: "balanced"|"caterpillar"} )

## Arguments

numTaxa
How many taxa this tree has.

Argument type: pass by const reference
Value type: Natural

type
The type of the shape of the topology.

Argument type: pass by value
Value type: String

Options
balanced
caterpillar

Default value "balanced"

simplex

## Usage

simplex(RealPos x1, RealPos x2, RealPos ...)

## Arguments

x1
first value

Argument type: pass by const reference
Value type: RealPos

x2
second value

Argument type: pass by const reference
Value type: RealPos

Argument type: pass by const reference
Value type: RealPos

source

## Usage

source(String file, Bool echo.on)

## Arguments

file
The name of the file to read-in.

Argument type: pass by value
Value type: String

echo.on
Should we print the commands from the file on the screen?

Argument type: pass by value
Value type: Bool
Default value false

sqrt

sqrt(RealPos x)

## Arguments

x
A number.

Argument type: pass by const reference
Value type: RealPos

stdev

stdev(Real[] x)

## Arguments

x
The vector of samples.

Argument type: pass by const reference
Value type: Real[]

Shows all the information about a given variable.

structure

str

## Description

Shows all the information about a given variable.

## Usage

structure(RevObject x, Bool verbose)

## Arguments

x
The variable.

Argument type: pass by const reference
Value type: RevObject

verbose
Do you want all the information?

Argument type: pass by value
Value type: Bool
Default value false

## Example

```# create a variable
a <- 1
b := exp(a)
# now create a deterministic variable which will be a child of 'b'
c := ln(b)
# now create a constant variable which will not be a child of 'b'
d <- ln(b)

str(b)
```

Sebastian Hoehna

sum

sum(Real[] x)

## Arguments

x
A vector of numbers.

Argument type: pass by const reference
Value type: Real[]

symDiff

## Usage

symDiff(TimeTree tree1, TimeTree tree2)

## Arguments

tree1
The first tree.

Argument type: pass by const reference
Value type: TimeTree

tree2
The second tree.

Argument type: pass by const reference
Value type: TimeTree

Run a system command.

system

## Description

Run a system command.

## Usage

system(String command)

## Arguments

command
The system command to execute.

Argument type: pass by value
Value type: String

## Details

This function will delegate the command to the system. In that way, the function works as an interface to the shell.

## Example

```# We can execute any command just as if you are using a terminal
system("ls")
system("pwd")
```

Sebastian Hoehna

tanh

tanh(Real x)

## Arguments

x
The value.

Argument type: pass by const reference
Value type: Real

tmrca

## Arguments

tree
The tree variable.

Argument type: pass by const reference
Value type: TimeTree

Argument type: pass by value

stemAge
Do we want the stem age or crown age?

Argument type: pass by value
Value type: Bool
Default value false

trunc

trunc(Real x)

## Arguments

x
The value.

Argument type: pass by const reference
Value type: Real

The value type of a variable.

type

## Description

The value type of a variable.

## Usage

type(RevObject x)

## Arguments

x
A variable.

Argument type: pass by value
Value type: RevObject

## Example

```a <- 2
type(a)

b <- 2.0
type(b)
```

## Author

Sebastian Hoehna

'v' creates a vector of the elements '...'

v

## Description

'v' creates a vector of the elements '...'

## Usage

v(Integer , Integer ...)

## Arguments

first value

Argument type: pass by const reference
Value type: Integer

more values

Argument type: pass by const reference
Value type: Integer

## Details

'v' creates a vector of the elements '...', which are objects of a common base type. Vector elements may themselves be vectors.

## Example

```# create a vector, Natural[]
x <- v(1,2,3)
x <- x + 1
x

y <- v(2,4,6)
# create a vector of Natural[][]
z <- v(x,y)
z
z[0]
```

Michael Landis

var

var(Real[] x)

## Arguments

x
A vector of values.

Argument type: pass by const reference
Value type: Real[]

vectorFlatten

## Usage

vectorFlatten(Real[][] x)

## Arguments

x
A vector of a vector.

Argument type: pass by const reference
Value type: Real[][]

write

print

## Usage

write(RevObject , RevObject ..., String filename, Bool append, String separator)

## Arguments

A variable to write.

Argument type: pass by value
Value type: RevObject

Argument type: pass by const reference
Value type: RevObject

filename
Writing to this file, or to the screen if name is empty.

Argument type: pass by value
Value type: String
Default value ""

append
Append or overwrite existing file?

Argument type: pass by value
Value type: Bool
Default value false

separator
How to separate values between variables.

Argument type: pass by value
Value type: String
Default value " "

writeFasta

## Usage

writeFasta(String filename, AbstractHomologousDiscreteCharacterData data)

## Arguments

filename
The name of the file.

Argument type: pass by value
Value type: String

data
The character data object.

Argument type: pass by value
Value type: AbstractHomologousDiscreteCharacterData

writeNexus

## Usage

writeNexus(String filename, AbstractHomologousDiscreteCharacterData|ContinuousCharacterData data)

## Arguments

filename
The name of the file.

Argument type: pass by value
Value type: String

data
The character data matrix to print.

Argument type: pass by value
Value type: AbstractHomologousDiscreteCharacterData

Distribution

dnBDPTopology

## Usage

dnBDPTopology(RealPos lambda, RealPos mu, RealPos origin, RealPos rootAge, Probability rho, String samplingStrategy {valid options: "uniform"|"diversified"} , String condition {valid options: "time"|"survival"|"nTaxa"} , Taxon[] taxa)

## Arguments

lambda
The constant speciation rate.

Argument type: pass by const reference
Value type: RealPos

mu
The constant extinction rate.

Argument type: pass by const reference
Value type: RealPos
Default value 0

origin
The time of the process starting at the origin, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rootAge
The time of the process starting at the root, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rho
The taxon sampling probability.

Argument type: pass by const reference
Value type: Probability
Default value 1

samplingStrategy
The sampling strategy of including taxa at the present.

Argument type: pass by value
Value type: String

Options
uniform
diversified

Default value "uniform"

condition
The condition of the process.

Argument type: pass by value
Value type: String

Options
time
survival
nTaxa

Default value "survival"

taxa
The taxa used for initialization.

Argument type: pass by const reference
Value type: Taxon[]
Default value NULL

## Methods

methods >> << Show less

methods

## Usage

methods()

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

dnBernoulli

## Description

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Usage

dnBernoulli(Probability p)

## Arguments

p
The probability of success.

Argument type: pass by const reference
Value type: Probability

## Methods

methods >> << Show less

methods

methods()

## Author

John Huelsenbeck

The Beta probability distribution.

dnBeta

## Description

The Beta probability distribution.

## Usage

dnBeta(RealPos alpha, RealPos beta)

## Arguments

alpha
The alpha shape parameter.

Argument type: pass by const reference
Value type: RealPos

beta
The beta shape parameter.

Argument type: pass by const reference
Value type: RealPos

## Methods

methods >> << Show less

methods

methods()

## Author

Sebastian Hoehna

A bimodal lognormal distribution, that is, with probability p a value is distributed according to the first lognormal distribution and with probability 1-p from the second lognormal distribution.

## Name

dnBimodalLognormal

## Description

A bimodal lognormal distribution, that is, with probability p a value is distributed according to the first lognormal distribution and with probability 1-p from the second lognormal distribution.

## Usage

dnBimodalLognormal(Real mean1, Real mean2, RealPos sd1, RealPos sd2, Probability p)

## Arguments

mean1
The mean (in log-space) of the first lognormal distribution.

Argument type: pass by const reference
Value type: Real

mean2
The mean (in log-space) of the second lognormal distribution.

Argument type: pass by const reference
Value type: Real

sd1
The standard deviation of the first lognormal distribution.

Argument type: pass by const reference
Value type: RealPos

sd2
The standard deviation of the secind lognormal distribution.

Argument type: pass by const reference
Value type: RealPos

p
The probability to belong to the first distribution.

Argument type: pass by const reference
Value type: Probability

## Methods

methods >> << Show less

methods

methods()

## Author

Sebastian Hoehna

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

dnBimodalNormal

## Description

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Usage

dnBimodalNormal(Real mean1, Real mean2, RealPos sd1, RealPos sd2, Probability p)

## Arguments

mean1
Mean of the first normal distribution.

Argument type: pass by const reference
Value type: Real

mean2
Mean of the second normal distribution.

Argument type: pass by const reference
Value type: Real

sd1
Standard deviation of the first normal distributin.

Argument type: pass by const reference
Value type: RealPos

sd2
Standard deviation of the second normal distribution.

Argument type: pass by const reference
Value type: RealPos

p
Probability that the value belongs to the first normal distribution.

Argument type: pass by const reference
Value type: Probability

## Methods

methods >> << Show less

methods

methods()

## Author

Sebastian Hoehna

Binomial probability distribution of x successes in n trials.

dnBinomial

## Description

Binomial probability distribution of x successes in n trials.

## Usage

dnBinomial(Probability p, Natural n)

## Arguments

p
Probability of success.

Argument type: pass by const reference
Value type: Probability

n
Number of trials.

Argument type: pass by const reference
Value type: Natural

## Methods

methods >> << Show less

methods

methods()

Sebastian Hoehna

dnBirthDeath

dnBDP

## Usage

dnBirthDeath(RealPos lambda, RealPos mu, RealPos origin, RealPos rootAge, Probability rho, String samplingStrategy {valid options: "uniform"|"diversified"} , String condition {valid options: "time"|"survival"|"nTaxa"} , Taxon[] taxa)

## Arguments

lambda
The constant speciation rate.

Argument type: pass by const reference
Value type: RealPos

mu
The constant extinction rate.

Argument type: pass by const reference
Value type: RealPos
Default value 0

origin
The time of the process starting at the origin, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rootAge
The time of the process starting at the root, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rho
The taxon sampling probability.

Argument type: pass by const reference
Value type: Probability
Default value 1

samplingStrategy
The sampling strategy of including taxa at the present.

Argument type: pass by value
Value type: String

Options
uniform
diversified

Default value "uniform"

condition
The condition of the process.

Argument type: pass by value
Value type: String

Options
time
survival
nTaxa

Default value "survival"

taxa
The taxa used for initialization.

Argument type: pass by const reference
Value type: Taxon[]
Default value NULL

## Methods

methods >> << Show less

methods

methods()

## Name

dnBirthDeathMultiRate

## Usage

dnBirthDeathMultiRate(RealPos origin, RealPos rootAge, Probability rho, RealPos[] lambda, RealPos[] mu, RateGenerator Q, RealPos rate, Simplex pi, String condition {valid options: "time"|"survival"} , Taxon[] taxa)

## Arguments

origin
The origin of the process.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rootAge
The root age.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rho
The taxon-sampling probability.

Argument type: pass by const reference
Value type: Probability
Default value 1

lambda
Vector of speciation rates per rate category.

Argument type: pass by const reference
Value type: RealPos[]

mu
Vector of extinction rates per rate category.

Argument type: pass by const reference
Value type: RealPos[]

Q
Rate matrix of transition rates between diversification-rate categories.

Argument type: pass by const reference
Value type: RateGenerator

rate
Global rate of transition between rate categories.

Argument type: pass by const reference
Value type: RealPos

pi
State frequencies at the root.

Argument type: pass by const reference
Value type: Simplex

condition
The condition of the birth-death process.

Argument type: pass by value
Value type: String

Options
time
survival

Default value "survival"

taxa
The taxon names used for initialization.

Argument type: pass by value
Value type: Taxon[]

## Methods

methods >> << Show less

methods

## Usage

methods()

The categorical distribution, sometimes referred to as the generalized Bernoullidistribution. It describes the probability of one of K different outcomes,labeled from 1 to K, with each outcome probability separately specified.

dnCategorical

dnCat

## Description

The categorical distribution, sometimes referred to as the generalized Bernoullidistribution. It describes the probability of one of K different outcomes,labeled from 1 to K, with each outcome probability separately specified.

## Usage

dnCategorical(Simplex p)

## Arguments

p
The probability for each category.

Argument type: pass by const reference
Value type: Simplex

## Methods

methods >> << Show less

methods

methods()

## Author

Fredrik Ronquist

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

dnChisq

## Description

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Usage

dnChisq(Natural df)

## Arguments

df
The degrees of freedom.

Argument type: pass by const reference
Value type: Natural

## Methods

methods >> << Show less

methods

methods()

Sebastian Hoehna

dnCoalescent

## Usage

dnCoalescent(RealPos theta, String[] names, Clade[] constraints)

## Arguments

theta
The constant population size.

Argument type: pass by const reference
Value type: RealPos

names
The taxon names used when drawing a random tree.

Argument type: pass by value
Value type: String[]

constraints
The topological constraints strictly enforced.

Argument type: pass by value
Default value [ ]

## Methods

methods >> << Show less

methods

methods()

## Name

dnCoalescentSkyline

## Usage

dnCoalescentSkyline(RealPos[] theta, RealPos[] times, String method {valid options: "events"|"uniform"|"specified"} , String[] names, Clade[] constraints)

## Arguments

theta
A vector of per interval population sizes.

Argument type: pass by const reference
Value type: RealPos[]

times
A vector of times for the intervals, if applicable.

Argument type: pass by const reference
Value type: RealPos[]
Default value NULL

method
The method how intervals are defined.

Argument type: pass by value
Value type: String

Options
events
uniform
specified

Default value "events"

names
The names of the taxa used for simulation.

Argument type: pass by value
Value type: String[]

constraints
The strictly enforced topology constraints.

Argument type: pass by value
Default value [ ]

## Methods

methods >> << Show less

methods

methods()

dnCppNormal

## Usage

dnCppNormal(RealPos lambda, Real mu, RealPos sigma)

## Arguments

lambda
The rate of the Poisson distribution.

Argument type: pass by const reference
Value type: RealPos

mu
The mean of the normal distribution

Argument type: pass by const reference
Value type: Real

sigma
The standard deviation of the normal distribution

Argument type: pass by const reference
Value type: RealPos

## Methods

methods >> << Show less

methods

methods()

dnDPP

## Usage

dnDPP(RealPos concentration, Distribution__Real baseDistribution, Natural numElements)

## Arguments

concentration
The concentration parameter.

Argument type: pass by const reference
Value type: RealPos

baseDistribution
The base distribution for the per category values.

Argument type: pass by const reference
Value type: Distribution__Real

numElements
The number of elements drawn from this distribution.

Argument type: pass by value
Value type: Natural

## Methods

methods >> << Show less

methods

methods()

## Name

dnDecomposedInvWishart

## Usage

dnDecomposedInvWishart(MatrixRealSymmetric sigma, RealPos[] diagonal, Natural df, RealPos kappa, Natural dim)

## Arguments

sigma

Argument type: pass by const reference
Value type: MatrixRealSymmetric
Default value [ [ 0.0000 ] ]

diagonal

Argument type: pass by const reference
Value type: RealPos[]
Default value [ ]

df

Argument type: pass by const reference
Value type: Natural
Default value 0

kappa

Argument type: pass by const reference
Value type: RealPos
Default value 0

dim

Argument type: pass by const reference
Value type: Natural
Default value 0

## Methods

methods >> << Show less

methods

## Usage

methods()

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

dnDirichlet

## Description

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Usage

dnDirichlet(RealPos[] alpha)

## Arguments

alpha
The concentration parameter.

Argument type: pass by const reference
Value type: RealPos[]

## Methods

methods >> << Show less

methods

methods()

Sebastian Hoehna

## Name

dnDiversityDependentYule

## Usage

dnDiversityDependentYule(RealPos lambda, Natural capacity, RealPos origin, RealPos rootAge, String condition {valid options: "time"|"survival"|"nTaxa"} , Taxon[] taxa)

## Arguments

lambda
The initial speciation rate.

Argument type: pass by const reference
Value type: RealPos

capacity
The carrying capacity.

Argument type: pass by const reference
Value type: Natural

origin
The time of the process since the origin, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rootAge
The time of the process since the root, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

condition
The condition of the process.

Argument type: pass by value
Value type: String

Options
time
survival
nTaxa

Default value "survival"

taxa
The names of the taxa used for simulation.

Argument type: pass by value
Value type: Taxon[]

## Methods

methods >> << Show less

methods

methods()

dnEmpiricalTree

## Usage

dnEmpiricalTree(Natural burnin, TraceTree TraceTree)

## Arguments

burnin
The number of samples to discard.

Argument type: pass by value
Value type: Natural

TraceTree
The trace of tree samples.

Argument type: pass by value
Value type: TraceTree

## Methods

methods >> << Show less

methods

methods()

dnExponential

dnExp

## Usage

dnExponential(RealPos lambda)

## Arguments

lambda
The rate ( rate==1/mean) parameter.

Argument type: pass by const reference
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

dnFossilBirthDeath

dnFBDP

## Usage

dnFossilBirthDeath(RealPos lambda, RealPos mu, RealPos psi, RealPos origin, RealPos rootAge, Probability rho, String samplingStrategy {valid options: "uniform"|"diversified"} , String condition {valid options: "time"|"survival"|"nTaxa"} , Taxon[] taxa)

## Arguments

lambda
The constant speciation rate.

Argument type: pass by const reference
Value type: RealPos

mu
The constant extinction rate.

Argument type: pass by const reference
Value type: RealPos
Default value 0

psi
The constant fossilization rate.

Argument type: pass by const reference
Value type: RealPos
Default value 0

origin
The time of the process starting at the origin, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rootAge
The time of the process starting at the root, if applicable.

Argument type: pass by const reference
Value type: RealPos
Default value NULL

rho
The taxon sampling probability.

Argument type: pass by const reference
Value type: Probability
Default value 1

samplingStrategy
The sampling strategy of including taxa at the present.

Argument type: pass by value
Value type: String

Options
uniform
diversified

Default value "uniform"

condition
The condition of the process.

Argument type: pass by value
Value type: String

Options
time
survival
nTaxa

Default value "survival"

taxa
The taxa used for initialization.

Argument type: pass by const reference
Value type: Taxon[]
Default value NULL

## Methods

methods >> << Show less

methods

## Usage

methods()

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

dnGamma

## Description

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Usage

dnGamma(RealPos shape, RealPos rate)

## Arguments

shape
The shape parameter.

Argument type: pass by const reference
Value type: RealPos

rate
The rate parameter (rate = 1/scale).

Argument type: pass by const reference
Value type: RealPos

## Methods

methods >> << Show less

methods

methods()

## Author

Sebastian Hoehna

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

dnGeometric

dnGeom

## Description

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Usage

dnGeometric(Probability p)

## Arguments

p
The probability of success.

Argument type: pass by const reference
Value type: Probability

## Methods

methods >> << Show less

methods

methods()

Sebastian Hoehna

dnInverseWishart

dnInvWishart

## Usage

dnInverseWishart(MatrixRealSymmetric sigma, RealPos[] diagonal, Natural df, RealPos kappa, Natural dim)

## Arguments

sigma

Argument type: pass by const reference
Value type: MatrixRealSymmetric
Default value NULL

diagonal

Argument type: pass by const reference
Value type: RealPos[]
Default value NULL

df

Argument type: pass by const reference
Value type: Natural
Default value NULL

kappa

Argument type: pass by const reference
Value type: RealPos
Default value NULL

dim

Argument type: pass by const reference
Value type: Natural
Default value NULL

## Methods

methods >> << Show less

methods

methods()

dnLognormal

dnLnorm

## Usage

dnLognormal(Real mean, RealPos sd)

## Arguments

mean
The mean in log-space (observed mean is exp(m)).

Argument type: pass by const reference
Value type: Real

sd
The standard deviation in log-space.

Argument type: pass by const reference
Value type: RealPos

## Methods

methods >> << Show less

methods

## Usage

methods()

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

dnLoguniform

## Description

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Usage

dnLoguniform(RealPos min, RealPos max)

## Arguments

min
The lower bound.

Argument type: pass by const reference
Value type: RealPos

max
The upper bound.

Argument type: pass by const reference
Value type: RealPos

## Methods

methods >> << Show less

methods

methods()

Sebastian Hoehna

dnMixture

## Usage

dnMixture(Real[] values, Simplex probabilities)

## Arguments

values
The potential values.

Argument type: pass by const reference
Value type: Real[]

probabilities
The probabilitoes for each value.

Argument type: pass by const reference
Value type: Simplex

## Methods

methods >> << Show less

methods

methods()

## Name

dnMultiSpeciesCoalescent

## Usage

dnMultiSpeciesCoalescent(TimeTree speciesTree, RealPos|RealPos[] Ne, Taxon[] taxa)

## Arguments

speciesTree
The species in which the gene trees evolve.

Argument type: pass by const reference
Value type: TimeTree

Ne
The population sizes.

Argument type: pass by const reference
Value type: RealPos

taxa
The vector of taxa which have species and individual names.

Argument type: pass by value
Value type: Taxon[]

## Methods

methods >> << Show less

methods

## Usage

methods()

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

dnMultinomial

## Description

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Usage

dnMultinomial(Simplex p, Natural n)

## Arguments

p
The simplex of probabilities for the categories.

Argument type: pass by const reference
Value type: Simplex

n
The number of draws.

Argument type: pass by const reference
Value type: Natural

## Methods

methods >> << Show less

methods

methods()

## Author

Sebastian Hoehna

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Name

dnMultivariateNormal

## Description

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Usage

dnMultivariateNormal(Real[] mean, MatrixRealSymmetric covariance, MatrixRealSymmetric precision, RealPos scale)

## Arguments

mean
The vector of mean values.

Argument type: pass by const reference
Value type: Real[]

covariance
The variance-covariance matrix.

Argument type: pass by const reference
Value type: MatrixRealSymmetric
Default value NULL

precision
The precision matrix.

Argument type: pass by const reference
Value type: MatrixRealSymmetric
Default value NULL

scale
The scaling factor of the variance matrix.

Argument type: pass by const reference
Value type: RealPos
Default value 1

## Methods

clampAt >> << Show less

clampAt

## Usage

clampAt(Natural index, Real value)

## Arguments

index
The index of the value.

Argument type: value
Value type: Natural

value
The observed value.

Argument type: value
Value type: Real

methods >> << Show less

methods

methods()

## Author

Sebastian Hoehna

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

dnNormal

## Description

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Usage

dnNormal(Real mean, RealPos sd)

## Arguments

mean
The mean parameter.

Argument type: pass by const reference
Value type: Real
Default value 0

sd
The standard deviation parameter.

Argument type: pass by const reference
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Author

Sebastian Hoehna

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Name

dnOrnsteinUhlenbeck

dnOU

## Description

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Usage

dnOrnsteinUhlenbeck(Real x0, Real theta, RealPos alpha, RealPos sigma, RealPos time)

## Arguments

x0
The root parameter value.

Argument type: pass by const reference
Value type: Real

theta
The location of the optimum parameter.

Argument type: pass by const reference
Value type: Real

alpha
The attraction to the optimum parameter.

Argument type: pass by const reference
Value type: RealPos

sigma
The scaling parameter of the time.

Argument type: pass by const reference
Value type: RealPos

time
The duration of the process.

Argument type: pass by const reference
Value type: RealPos

## Methods

methods >> << Show less

methods

methods()

Sebastian Hoehna

dnPhyloBrownian

dnPhyloBM

## Usage

dnPhyloBrownian(TimeTree tree, RealPos sigma, Real drift)

## Arguments

tree
The tree along which the continuous character evolves.

Argument type: pass by const reference
Value type: TimeTree

sigma
The branch-length multiplier to scale the variance of the Brownian motion.

Argument type: pass by const reference
Value type: RealPos

drift
The drift parameter of the Brownian motion.

Argument type: pass by const reference
Value type: Real
Default value 0

## Methods

methods >> << Show less

methods

methods()

## Name

dnPhyloBrownianMVN

## Usage

dnPhyloBrownianMVN(Tree tree, RealPos|RealPos[] branchRates, RealPos|RealPos[] siteRates, Real|Real[] rootStates, Natural nSites)

## Arguments

tree
The tree along which the character evolves.

Argument type: pass by const reference
Value type: Tree

branchRates
The rate of evolution along a branch.

Argument type: pass by const reference
Value type: RealPos
Default value 1

siteRates
The rate of evolution per site.

Argument type: pass by const reference
Value type: RealPos
Default value 1

rootStates
The vector of root states.

Argument type: pass by const reference
Value type: Real
Default value 0

nSites
The number of sites which is used for the initialized (random draw) from this distribution.

Argument type: pass by value
Value type: Natural
Default value 10

## Methods

methods >> << Show less

methods

methods()

## Name

dnPhyloBrownianMultiVariate

## Usage

dnPhyloBrownianMultiVariate(TimeTree tree, MatrixRealSymmetric sigma)

## Arguments

tree
The tree along which the process evolves.

Argument type: pass by const reference
Value type: TimeTree

sigma
The variance-covariance matrix.

Argument type: pass by const reference
Value type: MatrixRealSymmetric

## Methods

methods >> << Show less

methods

methods()

## Name

dnPhyloBrownianREML

## Usage

dnPhyloBrownianREML(Tree tree, RealPos|RealPos[] branchRates, RealPos|RealPos[] siteRates, Natural nSites)

## Arguments

tree
The tree along which the process evolves.

Argument type: pass by const reference
Value type: Tree

branchRates
The per branch rate-multiplier(s).

Argument type: pass by const reference
Value type: RealPos
Default value 1

siteRates
The per site rate-multiplier(s).

Argument type: pass by const reference
Value type: RealPos
Default value 1

nSites
The number of sites used for simulation.

Argument type: pass by value
Value type: Natural
Default value 10

## Methods

methods >> << Show less

methods

methods()

dnPhyloCTMC

## Usage

dnPhyloCTMC(Tree tree, RateGenerator|RateGenerator[] Q, Simplex rootFrequencies, RealPos|RealPos[] branchRates, RealPos[] siteRates, Probability pInv, Natural nSites, String type {valid options: "DNA"|"RNA"|"AA"|"Pomo"|"Protein"|"Standard"|"NaturalNumbers"|"Restriction"} , Bool treatAmbiguousAsGap, String coding)

## Arguments

tree
The tree along which the process evolves.

Argument type: pass by const reference
Value type: Tree

Q
The global or branch-specific rate matrices.

Argument type: pass by const reference
Value type: RateGenerator

rootFrequencies
The root specific frequencies of the characters, if applicable.

Argument type: pass by const reference
Value type: Simplex
Default value NULL

branchRates
The global or branch-specific rate multipliers.

Argument type: pass by const reference
Value type: RealPos
Default value 1

siteRates
The rate categories for the sites.

Argument type: pass by const reference
Value type: RealPos[]
Default value [ ]

pInv
The probability of a site being invariant.

Argument type: pass by const reference
Value type: Probability
Default value 0

nSites
The number of sites, used for simulation.

Argument type: pass by value
Value type: Natural
Default value 10

type
The data type, used for simulation and initialization.

Argument type: pass by value
Value type: String

Options
DNA
RNA
AA
Pomo
Protein
Standard
NaturalNumbers
Restriction

Default value "DNA"

treatAmbiguousAsGap
Should we treat ambiguous characters as gaps/missing?

Argument type: pass by value
Value type: Bool
Default value false

coding

Argument type: pass by value
Value type: String
Default value "all"

## Methods

methods >> << Show less

methods

methods()

## Usage

dnPhyloCTMCClado(Tree tree, RateGenerator|RateGenerator[] Q, MatrixReal|MatrixReal[] cladoProbs, Simplex rootFrequencies, RealPos|RealPos[] branchRates, RealPos[] siteRates, Probability pInv, Natural nSites, String type {valid options: "DNA"|"RNA"|"AA"|"Pomo"|"Protein"|"Standard"|"NaturalNumbers"} , Bool treatAmbiguousAsGap)

## Arguments

tree

Argument type: pass by const reference
Value type: Tree

Q

Argument type: pass by const reference
Value type: RateGenerator

Argument type: pass by const reference
Value type: MatrixReal

rootFrequencies

Argument type: pass by const reference
Value type: Simplex
Default value NULL

branchRates

Argument type: pass by const reference
Value type: RealPos
Default value 1

siteRates

Argument type: pass by const reference
Value type: RealPos[]
Default value [ ]

pInv

Argument type: pass by const reference
Value type: Probability
Default value 0

nSites

Argument type: pass by value
Value type: Natural
Default value 10

type

Argument type: pass by value
Value type: String

Options
DNA
RNA
AA
Pomo
Protein
Standard
NaturalNumbers

Default value "NaturalNumbers"

treatAmbiguousAsGap

Argument type: pass by value
Value type: Bool
Default value false

## Methods

methods >> << Show less

methods

methods()

dnPhyloDACTMC

## Usage

dnPhyloDACTMC(Tree tree, RateMap Q, Simplex cladoProbs, Bool forbidExtinction, Bool useCladogenesis, String type {valid options: "Biogeo"|"DNA"|"RNA"|"AA"|"Protein"|"Standard"} )

## Arguments

tree
The along which the character(s) evolve.

Argument type: pass by const reference
Value type: Tree

Q
The transition rate matrix.

Argument type: pass by const reference
Value type: RateMap

Argument type: pass by const reference
Value type: Simplex
Default value NULL

forbidExtinction
Should we exclude complete extinction (zero areas occupied)?

Argument type: pass by value
Value type: Bool
Default value true

Argument type: pass by value
Value type: Bool
Default value true

type
The character data type used for initialization and simulation.

Argument type: pass by value
Value type: String

Options
Biogeo
DNA
RNA
AA
Protein
Standard

Default value "DNA"

## Methods

methods >> << Show less

methods

methods()

## Name

dnPhyloDistanceGamma

## Usage

dnPhyloDistanceGamma(Tree tree, RlDistanceMatrix distanceMatrix, RlDistanceMatrix varianceMatrix, String[] names)

## Arguments

tree

Argument type: pass by const reference
Value type: Tree

distanceMatrix

Argument type: pass by const reference
Value type: RlDistanceMatrix

varianceMatrix

Argument type: pass by const reference
Value type: RlDistanceMatrix

names

Argument type: pass by value
Value type: String[]

## Methods

methods >> << Show less

methods

methods()

## Name

dnPhyloOrnsteinUhlenbeck

dnPhyloOU

## Usage

dnPhyloOrnsteinUhlenbeck()

## Methods

methods >> << Show less

methods

methods()

## Name

dnPhyloWhiteNoise

## Usage

dnPhyloWhiteNoise(TimeTree tree, RealPos sigma)

## Arguments

tree
The tree along which the process evolves.

Argument type: pass by const reference
Value type: TimeTree

sigma
The standard deviation.

Argument type: pass by const reference
Value type: RealPos

## Methods

methods >> << Show less

methods

## Usage

methods()

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

dnPoisson

## Description

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Usage

dnPoisson(RealPos lambda)

## Arguments

lambda
The rate (rate = 1/mean) parameter.

Argument type: pass by const reference
Value type: RealPos

## Methods

methods >> << Show less

methods

methods()

Sebastian Hoehna

## Name

dnReversibleJumpMixture

dnRJMixture

## Usage

dnReversibleJumpMixture(Real constantValue, Distribution__Real baseDistribution, Probability p)

## Arguments

constantValue
The fixed value this distribution can take.

Argument type: pass by const reference
Value type: Real

baseDistribution
The distribution from which the value is alternatively drawn.

Argument type: pass by const reference
Value type: Distribution__Real

p
The probability of being the fixed value.

Argument type: pass by const reference
Value type: Probability

## Methods

methods >> << Show less

methods

## Usage

methods()

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Name

dnSoftBoundUniformNormal

## Description

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

## Usage

dnSoftBoundUniformNormal(Real min, Real max, RealPos sd, Probability p)

## Arguments

min
The min value of the uniform distribution.

Argument type: pass by const reference
Value type: Real

max
The max value of the uniform distribution.

Argument type: pass by const reference
Value type: Real

sd
The standard deviation of the normal distribution.

Argument type: pass by const reference
Value type: RealPos

p
The probability of being within the uniform distribution.

Argument type: pass by const reference
Value type: Probability

## Methods

methods >> << Show less

methods

methods()

Sebastian Hoehna

dnUniform

dnUnif

## Usage

dnUniform(Real lower, Real upper)

## Arguments

lower
The lower bound.

Argument type: pass by const reference
Value type: Real

upper
The upper bound.

Argument type: pass by const reference
Value type: Real

## Methods

methods >> << Show less

methods

methods()

## Name

dnUniformTimeTree

## Usage

dnUniformTimeTree(RealPos rootAge, Taxon[] taxa)

## Arguments

rootAge
The age of the root.

Argument type: pass by const reference
Value type: RealPos

taxa
The taxa used for simulation.

Argument type: pass by value
Value type: Taxon[]

## Methods

methods >> << Show less

methods

methods()

## Name

dnUniformTopology

## Arguments

taxa
The vector of taxa that will be used for the tips.

Argument type: pass by const reference
Value type: Taxon[]
Default value NULL

constraints
The topological constraints that will be enforced.

Argument type: pass by value
Default value NULL

## Methods

methods >> << Show less

methods

methods()

dnWishart

## Usage

dnWishart(Natural df, RealPos kappa, Natural dim)

## Arguments

df
The degrees of dreedom.

Argument type: pass by const reference
Value type: Natural

kappa
The scaling parameter.

Argument type: pass by const reference
Value type: RealPos

dim
The dimension of the distribution.

Argument type: pass by const reference
Value type: Natural

## Methods

methods >> << Show less

methods

methods()

Moves

mvBetaSimplex

## Alias

mvSimplexElementScale

## Arguments

x
The variable this move operates on.

Argument type: reference
Value type: Simplex

alpha
The concentration parameter on the current value.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune the concentration parameter during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvCharacterHistory

## Arguments

ctmc
The PhyloCTMC variable.

Argument type: reference
Value type: AbstractHomologousDiscreteCharacterData

qmap
Some rate-map.

Argument type: reference
Value type: RateMap

tree
The tree.

Argument type: reference
Value type: Tree

lambda

Argument type: value
Value type: Probability
Default value 1

type
The data type.

Argument type: value
Value type: String

Options
Biogeo
DNA
RNA
AA
Protein
Standard

Default value "Standard"

graph

Argument type: value
Value type: String

Options
node
branch

Default value "node"

proposal

Argument type: value
Value type: String

Options
rejection
uniformization

Default value "rejection"

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvCollapseExpandFossilBranch

## Arguments

tree
The tree on which this moves operates on. It should be a fossil tree!

Argument type: reference
Value type: TimeTree

origin
The variable for the origin of the process giving a maximum age for the new fossil attachement time.

Argument type: reference
Value type: RealPos

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvConjugateInverseWishartBrownian

## Arguments

x
The variable on which this move operates.

Argument type: reference
Value type: MatrixRealSymmetric

kappa
The scaling parameter of the distribution.

Argument type: reference
Value type: Real

df
The degrees of freedom of the distribution.

Argument type: reference
Value type: Natural

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvDPPAllocateAuxGibbs

## Arguments

x
The variable on which this move operates.

Argument type: reference
Value type: Real[]

numAux
The number of auxillary categories.

Argument type: value
Value type: Integer
Default value 4

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvDPPGibbsConcentration

## Arguments

concentration

Argument type: reference
Value type: RealPos

numDPPCats

Argument type: const reference
Value type: Integer

gammaShape

Argument type: const reference
Value type: RealPos

gammaRate

Argument type: const reference
Value type: RealPos

numElements

Argument type: const reference
Value type: RealPos

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvDirichletSimplex

mvSimplex

## Arguments

x
The simplex on which this move operates.

Argument type: reference
Value type: Simplex

alpha
The concentration parameter on the previous value.

Argument type: value
Value type: RealPos
Default value 1

numCats
The number of categories changed per move.

Argument type: value
Value type: Natural
Default value 1

offset
The offset of the current value to center new proposals (x+offset).

Argument type: value
Value type: Natural
Default value 0

tune
Should we tune this move during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvEmpiricalTree

## Arguments

tree
The stochastic tree variable on which this moves operates.

Argument type: reference
Value type: Tree

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvFNPR

## Arguments

tree
The time-tree variable on which this move operates.

Argument type: reference
Value type: TimeTree

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvGPR

## Arguments

tree
The tree variable on which this move operates.

Argument type: reference
Value type: TimeTree

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvLevyJump

## Arguments

x
The variable this move operates on.

Argument type: reference
Value type: Real

delta
The window size of the proposals.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvLevyJumpSum

## Arguments

value_1

Argument type: reference
Value type: Real

value_2

Argument type: reference
Value type: Real

slide

Argument type: value
Value type: RealPos
Default value 1

tune

Argument type: value
Value type: Bool
Default value false

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvMatrixElementSlide

## Arguments

x
The variable on which this move operates.

Argument type: reference
Value type: MatrixReal

lambda
The scaling factor (strength) of the proposal.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune the scaling factor during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvMixtureAllocation

## Arguments

x
The variable on which this move operates.

Argument type: reference
Value type: Real

delta
The window of how many categories to propose left and right.

Argument type: value
Value type: Natural
Default value 0

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvNNI

## Arguments

tree
The tree on which this move operates.

Argument type: reference
Value type: TimeTree

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvNarrow

## Arguments

tree
The tree variable on which this move operates.

Argument type: reference
Value type: TimeTree

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvNodeCharacterHistoryRejectionSample

## Arguments

ctmc

Argument type: reference
Value type: AbstractHomologousDiscreteCharacterData

qmap

Argument type: reference
Value type: RateMap

tree

Argument type: reference
Value type: TimeTree

lambda

Argument type: value
Value type: Probability
Default value 1

type

Argument type: value
Value type: String

Options
std
biogeo

Default value "std"

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvNodeTimeScale

## Arguments

tree
The tree on which this move operates.

Argument type: reference
Value type: TimeTree

lambda
The scaling factor (strength) of the proposals.

Argument type: value
Value type: RealPos
Default value 1

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvNodeTimeSlideBeta

## Arguments

tree
The tree variable on which this move operates.

Argument type: reference
Value type: TimeTree

delta
The concentration parameter.

Argument type: value
Value type: RealPos
Default value 1

offset
The offset for the proposal density.

Argument type: value
Value type: RealPos
Default value 2

tune
Should we tune the concentration parameter during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvNodeTimeSlideUniform

## Arguments

tree
The tree on which this move operates.

Argument type: reference
Value type: TimeTree

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvPathCharacterHistoryRejectionSample

## Arguments

ctmc

Argument type: reference
Value type: AbstractHomologousDiscreteCharacterData

qmap

Argument type: reference
Value type: RateMap

tree

Argument type: reference
Value type: TimeTree

lambda

Argument type: value
Value type: Probability
Default value 0.1

type

Argument type: value
Value type: String

Options
std
biogeo

Default value "std"

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvRJSwitch

## Arguments

x
The variable on which this move operates.

Argument type: reference
Value type: Real

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvRandomGeometricWalk

## Arguments

x
The variable on which this move operates.

Argument type: reference
Value type: Integer

alpha
The success probability of the geometric distribution.

Argument type: value
Value type: Probability
Default value 0.5

tune
Should we tune the success probability during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvRandomIntegerWalk

## Arguments

x
The variable on which this move operates.

Argument type: reference
Value type: Integer

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvRateAgeBetaShift

## Arguments

tree
The tree on which this move operates on.

Argument type: reference
Value type: Tree

rates
The vector of per-branch rates (from a relaxed clock).

Argument type: reference
Value type: RealPos[]

delta
The concentration of the move on the previous age.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune this move during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvRootTimeSlide

## Arguments

tree
The tree variable on which this move operates.

Argument type: reference
Value type: TimeTree

origin
The origin giving an upper bound.

Argument type: reference
Value type: RealPos

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvSPR

## Arguments

tree
The tree variable this move operates on.

Argument type: reference
Value type: BranchLengthTree

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvScale

## Arguments

x
The variable this move operates on.

Argument type: reference
Value type: RealPos

lambda
The strength of the proposal.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune lambda during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvScalerUpDown

## Arguments

value_1

Argument type: reference
Value type: Real

value_2

Argument type: reference
Value type: Real

scale

Argument type: value
Value type: RealPos
Default value 1

tune

Argument type: value
Value type: Bool
Default value false

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvSlice

## Arguments

x
The variable on which this move operates

Argument type: reference
Value type: Real

window
The window (steps-size) of proposals.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune the move during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvSlide

## Arguments

x
The variable on which this move operates.

Argument type: reference
Value type: Real

delta
The window size parameter.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune the window size during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvSliderUpDown

## Arguments

value_1
The variable to slide up.

Argument type: reference
Value type: Real

value_2
The variable to slide down.

Argument type: reference
Value type: Real

slide
The window size parameter.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune the window size during burnin?

Argument type: value
Value type: Bool
Default value false

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvSpeciesNarrow

## Arguments

speciesTree
The species tree variable on which this move operates.

Argument type: reference
Value type: TimeTree

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Arguments

geneTree
A gene tree.

Argument type: reference
Value type: TimeTree

methods >> << Show less

methods

methods()

## Name

mvSpeciesNodeTimeSlideUniform

## Arguments

speciesTree
The species tree on which this move operates.

Argument type: reference
Value type: TimeTree

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Arguments

geneTree
A gene tree.

Argument type: reference
Value type: TimeTree

methods >> << Show less

methods

methods()

## Name

mvSpeciesSubtreeScale

## Arguments

speciesTree
The species variable on which this move operates.

Argument type: reference
Value type: TimeTree

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Arguments

geneTree
A gene tree to scale.

Argument type: reference
Value type: TimeTree

methods >> << Show less

methods

methods()

## Name

mvSpeciesSubtreeScaleBeta

## Arguments

speciesTree
The species tree on which this move operates on.

Argument type: reference
Value type: TimeTree

alpha
The concentration parameter.

Argument type: value
Value type: RealPos
Default value 10

tune
Should we tune the concentration parameter during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Arguments

geneTree
A gene tree.

Argument type: reference
Value type: TimeTree

methods >> << Show less

methods

methods()

## Name

mvSpeciesTreeScale

## Arguments

speciesTree
The species tree on which this move operates.

Argument type: reference
Value type: TimeTree

rootAge
The root age variable.

Argument type: reference
Value type: RealPos

delta
The strength of the proposal

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune the strength during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Arguments

geneTree
A gene tree variable.

Argument type: reference
Value type: TimeTree

methods >> << Show less

methods

methods()

mvSubtreeScale

## Arguments

tree
The tree variable on which this move operates.

Argument type: reference
Value type: TimeTree

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvSymmetricMatrixElementSlide

## Arguments

x
The matrix variable on which this move operates.

Argument type: reference
Value type: MatrixRealSymmetric

lambda
The sliding window size.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune the move during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvTreeNodeAgeSlide

## Arguments

tree
A (time-) tree on which this move operates.

Argument type: reference
Value type: TimeTree

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Arguments

geneTree
A gene tree.

Argument type: reference
Value type: TimeTree

methods >> << Show less

methods

methods()

mvTreeScale

## Arguments

tree
The tree variable the move operates on.

Argument type: reference
Value type: TimeTree

rootAge
The root age variable.

Argument type: reference
Value type: RealPos
Default value NULL

delta
The scaling factor (strength) of the proposal.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune the scaling factor during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvUpDownScale

## Arguments

lambda
The scaling factor (strength) of the proposal.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune the scaling factor during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Arguments

tree
The tree variable to scale.

Argument type: reference
Value type: TimeTree

up
Scaling up or down?

Argument type: value
Value type: Bool

## Arguments

var
The variable to scale

Argument type: reference
Value type: Real

up
Scaling up or down?

Argument type: value
Value type: Bool

## Arguments

var
The variable to scale

Argument type: reference
Value type: Real[]

up
Scaling up or down?

Argument type: value
Value type: Bool

## Arguments

var
The variable to scale

Argument type: reference
Value type: Real[]

up
Scaling up or down?

Argument type: value
Value type: Bool

## Arguments

var
The variable to scale

Argument type: reference
Value type: RealPos[]

up
Scaling up or down?

Argument type: value
Value type: Bool

methods >> << Show less

methods

## Usage

methods()

removeVariable >> << Show less

removeVariable

## Usage

removeVariable(TimeTree tree, Bool up)

## Arguments

tree
The tree variable to scale.

Argument type: reference
Value type: TimeTree

up
The variable to scale

Argument type: value
Value type: Bool

removeVariable >> << Show less

removeVariable

## Usage

removeVariable(Real var, Bool up)

## Arguments

var
Scaling up or down?

Argument type: reference
Value type: Real

up
The variable to scale

Argument type: value
Value type: Bool

removeVariable >> << Show less

removeVariable

## Usage

removeVariable(Real[] var, Bool up)

## Arguments

var
Scaling up or down?

Argument type: reference
Value type: Real[]

up
The variable to scale

Argument type: value
Value type: Bool

removeVariable >> << Show less

removeVariable

## Usage

removeVariable(Real[] var, Bool up)

## Arguments

var
Scaling up or down?

Argument type: reference
Value type: Real[]

up
The variable to scale

Argument type: value
Value type: Bool

removeVariable >> << Show less

removeVariable

## Usage

removeVariable(RealPos[] var, Bool up)

## Arguments

var
Scaling up or down?

Argument type: reference
Value type: RealPos[]

up
The variable to scale

Argument type: value
Value type: Bool

## Name

mvVectorFixedSingleElementSlide

## Arguments

x
The variable on which this move operates.

Argument type: reference
Value type: Real[]

lambda
The scaling factor (strength) of this move.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune the scaling factor during burnin?

Argument type: value
Value type: Bool
Default value true

element
The index of the element to scale.

Argument type: value
Value type: Natural
Default value 1

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvVectorScale

## Arguments

x
The variable on which this move operates.

Argument type: reference
Value type: RealPos[]

lambda
The scaling parameter (strength) of the move.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune the scaling parameter during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvVectorSingleElementScale

## Arguments

x
The variable on which this move operates.

Argument type: reference
Value type: RealPos[]

lambda
The scaling factor (strength) of this move.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune the scaling factor during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

## Name

mvVectorSingleElementSlide

## Arguments

x
The variable on which this move operates.

Argument type: reference
Value type: Real[]

lambda
The scaling factor (or strength) of the proposals.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we auto tune during burning?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

mvVectorSlide

## Arguments

x
The variable on which this move operates.

Argument type: reference
Value type: Real[]

delta
The window size parameter.

Argument type: value
Value type: RealPos
Default value 1

tune
Should we tune the window size during burnin?

Argument type: value
Value type: Bool
Default value true

weight
The weight how often on average this move will be used per iteration.

Argument type: value
Value type: RealPos
Default value 1

## Methods

methods >> << Show less

methods

methods()

Monitors

mnAncestralState

## Arguments

tree
The tree which we monitor.

Argument type: const reference
Value type: Tree

ctmc
The CTMC process.

Argument type: reference
Value type: RevObject

filename
The name of the file for storing the samples.

Argument type: value
Value type: String

type
The type of data to store.

Argument type: value
Value type: String

printgen
The frequency how often to sample.

Argument type: value
Value type: Natural
Default value 1

separator
The separator between columns in the file.

Argument type: value
Value type: String
Default value " "

append
Should we append or overwrite if the file exists?

Argument type: value
Value type: Bool
Default value false

## Arguments

x
A variable you want to monitor.

Argument type: reference
Value type: RevObject

methods >> << Show less

methods

methods()

## Name

mnCharHistoryNewick

## Arguments

filename

Argument type: value
Value type: String

ctmc

Argument type: const reference
Value type: AbstractHomologousDiscreteCharacterData

tree

Argument type: const reference
Value type: TimeTree

printgen

Argument type: value
Value type: Natural
Default value 1

separator

Argument type: value
Value type: String
Default value " "

posterior

Argument type: value
Value type: Bool
Default value true

likelihood

Argument type: value
Value type: Bool
Default value true

prior

Argument type: value
Value type: Bool
Default value true

append

Argument type: value
Value type: Bool
Default value true

style

Argument type: value
Value type: String

Options
events
counts

Default value "events"

type

Argument type: value
Value type: String

Options
biogeo

Default value "biogeo"

## Arguments

x
A variable you want to monitor.

Argument type: reference
Value type: RevObject

methods >> << Show less

methods

methods()

mnCharHistoryNhx

## Arguments

filename

Argument type: value
Value type: String

ctmc

Argument type: const reference
Value type: AbstractHomologousDiscreteCharacterData

tree

Argument type: const reference
Value type: TimeTree

atlas

Argument type: const reference
Value type: RlAtlas

samplegen

Argument type: value
Value type: Natural
Default value 1

maxgen

Argument type: value
Value type: Natural
Default value NULL

burnin

Argument type: value
Value type: Probability
Default value 0.2

separator

Argument type: value
Value type: String
Default value " "

posterior

Argument type: value
Value type: Bool
Default value true

likelihood

Argument type: value
Value type: Bool
Default value true

prior

Argument type: value
Value type: Bool
Default value true

type

Argument type: value
Value type: String

Options
biogeo

Default value "biogeo"

## Arguments

x
A variable you want to monitor.

Argument type: reference
Value type: RevObject

methods >> << Show less

methods

methods()

mnExtNewick

## Arguments

filename
The name of the file.

Argument type: value
Value type: String

tree
The tree variable.

Argument type: const reference
Value type: TimeTree

Variables at nodes or branches.

Argument type: const reference
Value type: RevObject

isNodeParameter
Is this a node or branch parameter?

Argument type: value
Value type: Bool
Default value true

printgen
How frequently do we print.

Argument type: value
Value type: Natural
Default value 1

separator
The separator between variables.

Argument type: value
Value type: String
Default value " "

posterior
Should we print the posterior probability as well.

Argument type: value
Value type: Bool
Default value true

likelihood
Should we print the likelihood as well?

Argument type: value
Value type: Bool
Default value true

prior
Should we print the prior probability as well?

Argument type: value
Value type: Bool
Default value true

## Arguments

x
A variable you want to monitor.

Argument type: reference
Value type: RevObject

methods >> << Show less

methods

methods()

mnFile

## Arguments

Variables to monitor

Argument type: const reference
Value type: RevObject

filename
The name of the file.

Argument type: value
Value type: String

printgen
How often should we print.

Argument type: value
Value type: Natural
Default value 1

separator
The separator/delimiter between values.

Argument type: value
Value type: String
Default value " "

posterior
Should we print the posterior probability as well?

Argument type: value
Value type: Bool
Default value true

likelihood
Should we print the likelihood as well?

Argument type: value
Value type: Bool
Default value true

prior
Should we print the prior probability as well?

Argument type: value
Value type: Bool
Default value true

append
Should we append or overwrite if the file exists?

Argument type: value
Value type: Bool
Default value false

## Arguments

x
A variable you want to monitor.

Argument type: reference
Value type: RevObject

methods >> << Show less

methods

methods()

## Name

mnJointConditionalAncestralState

## Arguments

tree

Argument type: reference
Value type: Tree

ctmc

Argument type: reference
Value type: AbstractHomologousDiscreteCharacterData

filename

Argument type: value
Value type: String

type

Argument type: value
Value type: String

printgen

Argument type: value
Value type: Natural
Default value 1

separator

Argument type: value
Value type: String
Default value " "

append

Argument type: value
Value type: Bool
Default value false

withTips

Argument type: value
Value type: Bool
Default value true

withStartStates

Argument type: value
Value type: Bool
Default value true

## Arguments

x
A variable you want to monitor.

Argument type: reference
Value type: RevObject

methods >> << Show less

methods

methods()

mnModel

## Arguments

filename
The name of the file where to store the values.

Argument type: value
Value type: String

printgen
The frequency how often to sample values.

Argument type: value
Value type: Natural
Default value 1

separator
The separator between different variables.

Argument type: value
Value type: String
Default value " "

posterior
Should we print the joint posterior probability?

Argument type: value
Value type: Bool
Default value true

likelihood
Should we print the likelihood?

Argument type: value
Value type: Bool
Default value true

prior
Should we print the joint prior probability?

Argument type: value
Value type: Bool
Default value true

append
Should we append to an existing file?

Argument type: value
Value type: Bool
Default value false

stochasticOnly
Should we monitor stochastic variables onle?

Argument type: value
Value type: Bool
Default value false

## Arguments

x
A variable you want to monitor.

Argument type: reference
Value type: RevObject

methods >> << Show less

methods

methods()

mnScreen

## Arguments

Variables to monitor.

Argument type: const reference
Value type: RevObject

printgen
The frequency how often the variables are monitored.

Argument type: value
Value type: Natural
Default value 1

posterior
Monitor the joint posterior probability.

Argument type: value
Value type: Bool
Default value true

likelihood
Monitor the joint likelihood.

Argument type: value
Value type: Bool
Default value true

prior
Monitor the joint prior probability.

Argument type: value
Value type: Bool
Default value true

## Arguments

x
A variable you want to monitor.

Argument type: reference
Value type: RevObject

methods >> << Show less

methods

methods()

## Name

mnStochasticVariable

## Arguments

filename
The name of the file.

Argument type: value
Value type: String

printgen
The frequency how often we print.

Argument type: value
Value type: Natural
Default value 1

separator
The delimiter between variables.

Argument type: value
Value type: String
Default value " "

append
Should we append or overwrite if the file exists?

Argument type: value
Value type: Bool
Default value false

## Arguments

x
A variable you want to monitor.

Argument type: reference
Value type: RevObject

methods >> << Show less

methods

methods()

Types

## Name

CorrespondenceAnalysis

## Usage

CorrespondenceAnalysis(MatrixReal data, Natural numAxes, RealPos tolerance)

## Arguments

data
The matrix of numerical values.

Argument type: pass by value
Value type: MatrixReal

numAxes
The number of principle components.

Argument type: pass by value
Value type: Natural

tolerance
The allowed machine tolerance.

Argument type: pass by value
Value type: RealPos
Default value 1e-07

## Methods

columnCoordinates >> << Show less

## Name

columnCoordinates

## Usage

columnCoordinates()

columnWeights >> << Show less

columnWeights

## Usage

columnWeights()

methods >> << Show less

methods

## Usage

methods()

principalAxes >> << Show less

principalAxes

## Usage

principalAxes()

rank >> << Show less

rank

## Usage

rank()

rowCoordinates >> << Show less

rowCoordinates

rowCoordinates()

beca

## Usage

beca(String|String[] filename, String delimiter)

## Arguments

filename
The name of the file with the parameter samples.

Argument type: pass by value
Value type: String

delimiter
The delimiter/separator between values.

Argument type: pass by value
Value type: String
Default value " "

## Methods

methods >> << Show less

methods

## Usage

methods()

run >> << Show less

run

## Usage

run()

setBurninMethod >> << Show less

setBurninMethod

## Usage

setBurninMethod(String method {valid options: "ESS"|"SEM"} )

## Arguments

method
The burnin estimation method.

Argument type: value
Value type: String

Options
ESS
SEM

verbose >> << Show less

verbose

verbose(Bool x)

## Arguments

x
Should the output be verbose?

Argument type: value
Value type: Bool

The MCMC analysis object keeps a model and the associated moves and monitors.The object is used to run Markov chain Monte Carlo (MCMC) simulation onthe model, using the provided moves, to obtain a sample of the posterior probabilitydistribution. During the analysis, the monitors are responsible for sampling model parameters of interest.

mcmc

## Description

The MCMC analysis object keeps a model and the associated moves and monitors.The object is used to run Markov chain Monte Carlo (MCMC) simulation onthe model, using the provided moves, to obtain a sample of the posterior probabilitydistribution. During the analysis, the monitors are responsible for sampling model parameters of interest.

## Usage

mcmc(Model model, Monitor[] monitors, Move[] moves, String moveschedule {valid options: "sequential"|"random"|"single"} , Natural nruns)

## Arguments

model
The model graph.

Argument type: pass by value
Value type: Model

monitors
The monitors used for this analysis.

Argument type: pass by value
Value type: Monitor[]

moves
The moves used for this analysis.

Argument type: pass by value
Value type: Move[]

moveschedule
The strategy how the moves are used.

Argument type: pass by value
Value type: String

Options
sequential
random
single

Default value "random"

nruns
The number of replicate analyses.

Argument type: pass by value
Value type: Natural
Default value 1

## Methods

burnin >> << Show less

burnin

## Usage

burnin(Natural generations, Natural tuningInterval)

## Arguments

generations
The number of generation to run this burnin simulation.

Argument type: value
Value type: Natural

tuningInterval
The interval when to update the tuning parameters of the moves.

Argument type: value
Value type: Natural

methods >> << Show less

methods

## Usage

methods()

operatorSummary >> << Show less

operatorSummary

## Usage

operatorSummary()

run >> << Show less

run

## Usage

run(Natural generations, StoppingRule[] rules, Bool underPrior)

## Arguments

generations
The number of generations to run.

Argument type: value
Value type: Natural

rules
The rules when to automatically stop the run.

Argument type: value
Value type: StoppingRule[]
Default value NULL

underPrior
Should we run this analysis under the prior only?

Argument type: value
Value type: Bool
Default value false

Sebastian Hoehna

## Reference

Metropolis N, AW Rosenbluth, MN Rosenbluth, AH Teller, E Teller (1953). Equation of state calculations by fast computing machines. Journal of Chemical Physics, 21:1087-1092.

Hastings WK (1970) Monte Carlo sampling methods using Markov chains and their applications. Biometrika, 57:97-109.

The Mcmcmc analysis object keeps a model and the associated moves and monitors.The object is used to run Metropolis Couped Markov chain Monte Carlo (Mcmcmc) simulation onthe model, using the provided moves, to obtain a sample of the posterior probabilitydistribution. During the analysis, the monitors are responsible for sampling model parameters of interest.

mcmcmc

## Description

The Mcmcmc analysis object keeps a model and the associated moves and monitors.The object is used to run Metropolis Couped Markov chain Monte Carlo (Mcmcmc) simulation onthe model, using the provided moves, to obtain a sample of the posterior probabilitydistribution. During the analysis, the monitors are responsible for sampling model parameters of interest.

## Usage

mcmcmc(Model model, Monitor[] monitors, Move[] moves, String moveschedule {valid options: "sequential"|"random"|"single"} , Natural nruns, Natural nchains, Natural swapInterval, RealPos deltaHeat)

## Arguments

model
The model graph.

Argument type: pass by value
Value type: Model

monitors
The monitors used for this analysis.

Argument type: pass by value
Value type: Monitor[]

moves
The moves used for this analysis.

Argument type: pass by value
Value type: Move[]

moveschedule
The strategy how the moves are used.

Argument type: pass by value
Value type: String

Options
sequential
random
single

Default value "random"

nruns
The number of replicate analyses.

Argument type: pass by value
Value type: Natural
Default value 1

nchains
The number of chains to run.

Argument type: pass by value
Value type: Natural
Default value 4

swapInterval
The interval at which swaps will be attempted.

Argument type: pass by value
Value type: Natural
Default value 100

deltaHeat
The delta parameter for the heat function.

Argument type: pass by value
Value type: RealPos
Default value 0.2

## Methods

burnin >> << Show less

burnin

## Usage

burnin(Natural generations, Natural tuningInterval)

## Arguments

generations
The number of generation to run this burnin simulation.

Argument type: value
Value type: Natural

tuningInterval
The interval when to update the tuning parameters of the moves.

Argument type: value
Value type: Natural

methods >> << Show less

methods

## Usage

methods()

operatorSummary >> << Show less

operatorSummary

## Usage

operatorSummary()

run >> << Show less

run

## Usage

run(Natural generations, StoppingRule[] rules, Bool underPrior)

## Arguments

generations
The number of generations to run.

Argument type: value
Value type: Natural

rules
The rules when to automatically stop the run.

Argument type: value
Value type: StoppingRule[]
Default value NULL

underPrior
Should we run this analysis under the prior only?

Argument type: value
Value type: Bool
Default value false

Michael Landis

Sebastian Hoehna

## Reference

Geyer,C.J. (1991) Markov chain Monte Carlo maximum likelihood. In Keramidas (ed.), Computing Science and Statistics: Proceedings of the 23rd Symposium on the Interface. Interface Foundation, Fairfax Station, pp. 156–163.

Gilks,W.R. and Roberts,G.O. (1996) Strategies for improving MCMC. In Gilks,W.R., Richardson,S. and Spiegelhalter (eds) Markov chain Monte Carlo in Practice. Chapman&Hall, London, 89–114.

Altekar, G.; Dwarkadas, S.; Huelsenbeck, J. P. & Ronquist, F. Parallel metropolis coupled Markov chain Monte Carlo for Bayesian phylogenetic inference Bioinformatics, Oxford Univ Press, 2004, 20, 407-415.

model

## Usage

model(RevObject x, RevObject ...)

## Arguments

x
Any variable that is connected in the model graph.

Argument type: pass by const reference
Value type: RevObject

Argument type: pass by const reference
Value type: RevObject

## Methods

graph >> << Show less

graph

## Usage

graph(String file, Bool verbose, String bg)

## Arguments

file
The name of the file where to save the model graph.

Argument type: value
Value type: String

verbose
Verbose output?

Argument type: value
Value type: Bool
Default value false

bg
The background color.

Argument type: value
Value type: String
Default value "lavenderblush2"

methods >> << Show less

methods

methods()

pathSampler

## Usage

pathSampler(String filename, String powerColumnName, String likelihoodColumnName, String delimiter)

## Arguments

filename
The filename where the likelihood samples are stored in.

Argument type: pass by value
Value type: String

powerColumnName
The name of the column that holds the values of the powers.

Argument type: pass by value
Value type: String

likelihoodColumnName
The name of the column that holds the likelihood values.

Argument type: pass by value
Value type: String

delimiter
The delimiter between columns.

Argument type: pass by value
Value type: String
Default value " "

## Methods

marginal >> << Show less

marginal

## Usage

marginal()

methods >> << Show less

methods

methods()

## Name

posteriorPredictiveAnalysis

## Usage

posteriorPredictiveAnalysis(MonteCarloAnalysis sampler, String directory)

## Arguments

sampler
The template Monte Carlo sampler instance.

Argument type: pass by value
Value type: MonteCarloAnalysis

directory
The name of the directory where the simulated data are.

Argument type: pass by value
Value type: String

## Methods

burnin >> << Show less

burnin

## Usage

burnin(Natural generations, Natural tuningInterval)

## Arguments

generations
The number of generations to run.

Argument type: value
Value type: Natural

tuningInterval
The number of iterations after which we tune the parameters of the moves.

Argument type: value
Value type: Natural

methods >> << Show less

methods

## Usage

methods()

run >> << Show less

run

## Usage

run(Natural generations)

## Arguments

generations
The number of generation to run.

Argument type: value
Value type: Natural

## Name

posteriorPredictiveSimulation

## Usage

posteriorPredictiveSimulation(Model model, String directory, ModelTrace[] trace)

## Arguments

model
The reference model instance.

Argument type: pass by const reference
Value type: Model

directory
The name of the directory where we store the simulations.

Argument type: pass by value
Value type: String

trace
The sample trace object.

Argument type: pass by const reference
Value type: ModelTrace[]

## Methods

methods >> << Show less

methods

## Usage

methods()

run >> << Show less

run

## Usage

run(Natural thinning)

## Arguments

thinning
The number of samples to jump over.

Argument type: value
Value type: Natural
Default value 1

powerPosterior

## Usage

powerPosterior(Model model, Move[] moves, Monitor[] monitors, String filename, RealPos[] powers, Natural cats, RealPos alpha, Natural sampleFreq)

## Arguments

model
The model graph.

Argument type: pass by value
Value type: Model

moves
The vector moves to use.

Argument type: pass by value
Value type: Move[]

monitors
The monitors to call. Do not provide a screen monitor.

Argument type: pass by value
Value type: Monitor[]

filename
The name of the file for the likelihood samples.

Argument type: pass by value
Value type: String

powers
A vector of powers.

Argument type: pass by value
Value type: RealPos[]
Default value NULL

cats
The number of categories if no powers are specified.

Argument type: pass by value
Value type: Natural
Default value 100

alpha
The alpha parameter of the beta distribution if no powers are specified.

Argument type: pass by value
Value type: RealPos
Default value 0.2

sampleFreq
The sampling frequency of the likelihood values.

Argument type: pass by value
Value type: Natural
Default value 100

## Methods

burnin >> << Show less

burnin

## Usage

burnin(Natural generations, Natural tuningInterval)

## Arguments

generations
The number of generations to run.

Argument type: value
Value type: Natural

tuningInterval
The frequency when the moves are tuned (usually between 50 and 1000).

Argument type: value
Value type: Natural

methods >> << Show less

methods

## Usage

methods()

run >> << Show less

run

## Usage

run(Natural generations)

## Arguments

generations
The number of generations to run.

Argument type: value
Value type: Natural

srGelmanRubin

## Usage

srGelmanRubin(RealPos R, String filename, Natural frequency, String burninMethod {valid options: "ESS"|"SEM"} )

## Arguments

R
The maximum allowed potential scale reduction factor.

Argument type: pass by value
Value type: RealPos

filename
The name of the file containing the samples.

Argument type: pass by value
Value type: String

frequency
The frequency how often to check for convergence.

Argument type: pass by value
Value type: Natural
Default value 10000

burninMethod
Which type of burnin method to use.

Argument type: pass by value
Value type: String

Options
ESS
SEM

Default value "ESS"

## Methods

methods >> << Show less

methods

methods()

srGeweke

## Usage

srGeweke(Probability prob, Probability frac1, Probability frac2, String filename, Natural frequency, String burninMethod {valid options: "ESS"|"SEM"} )

## Arguments

prob
The significance level.

Argument type: pass by value
Value type: Probability
Default value 0.05

frac1
The fraction of samples used for the first window.

Argument type: pass by value
Value type: Probability
Default value 0.1

frac2
The fraction of samples used for the second window.

Argument type: pass by value
Value type: Probability
Default value 0.5

filename
The name of the file containing the samples.

Argument type: pass by value
Value type: String

frequency
The frequency how often to check for convergence.

Argument type: pass by value
Value type: Natural
Default value 10000

burninMethod
Which type of burnin method to use.

Argument type: pass by value
Value type: String

Options
ESS
SEM

Default value "ESS"

## Methods

methods >> << Show less

methods

methods()

srMaxIteration

## Usage

srMaxIteration(Natural maxIteration)

## Arguments

maxIteration
The maximum number of iterations to run.

Argument type: pass by value
Value type: Natural

## Methods

methods >> << Show less

methods

methods()

srMaxTime

## Usage

srMaxTime(RealPos maxTime, String unit {valid options: "seconds"|"minutes"|"hours"} )

## Arguments

maxTime
The maximum time to run.

Argument type: pass by value
Value type: RealPos

unit
The unit in which we measure the maximum time.

Argument type: pass by value
Value type: String

Options
seconds
minutes
hours

Default value "seconds"

## Methods

methods >> << Show less

methods

methods()

srMinESS

## Usage

srMinESS(RealPos minEss, String filename, Natural frequency, String burninMethod {valid options: "ESS"|"SEM"} )

## Arguments

minEss
The minimum ESS threshold when stopping is allowed.

Argument type: pass by value
Value type: RealPos

filename
The name of the file containing the samples.

Argument type: pass by value
Value type: String

frequency
The frequency how often to check for convergence.

Argument type: pass by value
Value type: Natural
Default value 10000

burninMethod
Which type of burnin method to use.

Argument type: pass by value
Value type: String

Options
ESS
SEM

Default value "ESS"

## Methods

methods >> << Show less

methods

methods()

srStationarity

## Usage

srStationarity(Probability prob, String filename, Natural frequency, String burninMethod {valid options: "ESS"|"SEM"} )

## Arguments

prob
The significance level.

Argument type: pass by value
Value type: Probability

filename
The name of the file containing the samples.

Argument type: pass by value
Value type: String

frequency
The frequency how often to check for convergence.

Argument type: pass by value
Value type: Natural
Default value 10000

burninMethod
Which type of burnin method to use.

Argument type: pass by value
Value type: String

Options
ESS
SEM

Default value "ESS"

## Methods

methods >> << Show less

methods

methods()

## Name

steppingStoneSampler

## Usage

steppingStoneSampler(String filename, String powerColumnName, String likelihoodColumnName, String delimiter)

## Arguments

filename
The name of the file where the likelhood samples are stored.

Argument type: pass by value
Value type: String

powerColumnName
The name of the column of the powers.

Argument type: pass by value
Value type: String

likelihoodColumnName
The name of the column of the likelihood samples.

Argument type: pass by value
Value type: String

delimiter
The column delimiter.

Argument type: pass by value
Value type: String
Default value " "

## Methods

marginal >> << Show less

marginal

## Usage

marginal()

methods >> << Show less

methods

methods()

taxon

## Usage

taxon(String taxonName, String speciesName, Real age)

## Arguments

taxonName
The name of the taxon.

Argument type: pass by value
Value type: String

speciesName
The name of the species it belongs to.

Argument type: pass by value
Value type: String

age
The age before the present when this taxon was sampled.

Argument type: pass by value
Value type: Real
Default value 0

## Methods

getAge >> << Show less

getAge

## Usage

getAge()

getSpeciesName >> << Show less

getSpeciesName

## Usage

getSpeciesName()

methods >> << Show less

methods

methods()

## Name

validationAnalysis

## Usage

validationAnalysis(MonteCarloAnalysis sampler, Natural simulations)

## Arguments

sampler
The template Monte Carlo sampler instance.

Argument type: pass by value
Value type: MonteCarloAnalysis

simulations
How many replicate simulations to run.

Argument type: pass by value
Value type: Natural

## Methods

burnin >> << Show less

burnin

## Usage

burnin(Natural generations, Natural tuningInterval)

## Arguments

generations
The number of generations to run.

Argument type: value
Value type: Natural

tuningInterval
The number of iterations after which we tune the parameters of the moves.

Argument type: value
Value type: Natural

methods >> << Show less

methods

## Usage

methods()

run >> << Show less

run

## Usage

run(Natural generations)

## Arguments

generations
The number of generation to run.

Argument type: value
Value type: Natural

summarize >> << Show less

summarize

summarize()