Since unequal probabilities are incorporated in calculating the
density via dsb
, all branches are assumed to be of unit length.
Thus, the dloc
function simply returns 0 if log=TRUE
and 1 if log=FALSE
.
dloc(loc, min = 0, max = 1, log = TRUE)rloc(k, min = 0, max = 1)
A numeric vector:
Returns `0`, as the log probability of a uniform distribution is always `log(1) = 0`.
Returns `1`, indicating a uniform probability distribution along the branch.
The location of the shift along the branch
The minimum position on the branch the shift can take
The maximum position on the branch the shift can take
A logical indicating whether the log density should be returned
The number of shifts to return along a branch
dloc
calculates the probability of a shift occuring at a given
location along the branch assuming a uniform distribution of unit length
rloc
randomly generates the location of a shift along the branch