clads2_delayed.tppl
function clads2
Main model function
model function clads2(tree: Tree, rho: Real) => Real[]
type Dists
type Dists = Dists {
gdist: GammaDist,
nigdist: NormalInverseGammaDist
}
type DistsBool
type DistsBool = DistsBool {
d : Dists,
detected : Bool
}
type Globals
type Globals = Globals {
epsilon: Real,
rho: Real
}
function isDetected
Forward simulation determining whether a tree survives and is detected (sampled)
function isDetected(g: Globals, d: Dists, multiplier: Real, tBegin: Real) => DistsBool
function numTrialsUntilMRCADetection
Get an estimate of the probability of the MRCA being detected under given parameter values
function numTrialsUntilMRCADetection(g: Globals, d: Dists, tRoot: Real, mMax: Int) => Int
type Params
type Params = Params {
d: Dists,
multiplier: Real
}
function simHiddenSpeciation
Simulate hidden speciation along an observed branch
function simHiddenSpeciation(g: Globals, d: Dists, multiplier: Real, startTime: Real, endTime: Real) => Params
type alias Tree
type alias Tree = ClockTree
function walk
Simulate process along the observed tree
function walk(g: Globals, d: Dists, multiplier: Real, parentAge: Real, node: Tree) => Dists