Learn R Programming

bayou (version 2.1.1)

dloc: Probability density function for the location of the shift along the branch

Description

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.

Usage

dloc(loc, min = 0, max = 1, log = TRUE)

rloc(k, min = 0, max = 1)

Arguments

loc

The location of the shift along the branch

min

The minimum position on the branch the shift can take

max

The maximum position on the branch the shift can take

log

A logical indicating whether the log density should be returned

k

The number of shifts to return along a branch

Details

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