Rev Language Reference


mvFossilTipTimeUniform - Move to uniformly draw fossil tip ages

This moves either takes a specific fossil, or randomly picks a fossil, and then draws the new ages randomly between the maximum and minimum ages.

Usage

mvFossilTipTimeUniform(TimeTree tree, RealPos origin, RealPos max, RealPos min, String tip, RealPos weight, Probability tuneTarget)

Arguments

tree : TimeTree (<stochastic> pass by reference)
The tree on which this move operates.
origin : RealPos (pass by reference)
The variable for the origin of the process giving a maximum age.
Default : NULL
max : RealPos (pass by reference)
The variable for the maximum age of this fossil tip.
Default : NULL
min : RealPos (pass by reference)
The variable for the minimun age of this fossil tip.
Default : NULL
tip : String (pass by const reference)
The name of a specific tip/taxon.
weight : RealPos (pass by value)
The weight determines the relative frequency with which this move will be attempted. For details, see the description of the 'moveschedule' parameter on the documentation page for 'mcmc()'.
Default : 1
tuneTarget : Probability (pass by value)
The acceptance probability targeted by auto-tuning.
Default : 0.44

Details

The maximum ages is computed either by its parents or the maximum age in the uncertainty of the fossil, which can be provided to the move or is taken from the taxon object. The minimum ages is computed either by its oldest descendant (for sampled ancestors) or the minimum age in the uncertainty of the fossil, which can be provided to the move or is taken from the taxon object.

Example


# Use a for loop to create a uniform distribution on the occurrence time for each fossil #
# The boundaries of the uniform distribution are specified in the tsv file #
fossils = fbd_tree.getFossils()
for(i in 1:fossils.size())
{
    t[i] := tmrca(fbd_tree, clade(fossils[i]))

    a[i] = fossils[i].getMinAge()
    b[i] = fossils[i].getMaxAge()

    F[i] ~ dnUniform(t[i] - b[i], t[i] - a[i])
    F[i].clamp( 0 )
    moves.append( mvFossilTipTimeUniform(fbd_tree, origin_time, min=a[i], max=b[i], tip=fossils[i], weight=5.0) )
    moves.append( mvFossilTipTimeSlideUniform(fbd_tree, origin_time, min=a[i], max=b[i], tip=fossils[i], weight=5.0) )
}

See Also