Compute the transition probability

transition_prob(p, params, duplication, state, array, as_log = FALSE)

conditional_prob(p, params, duplication, state, array, i, j, as_log = FALSE)

Arguments

p

An object of class geese or flock.

params

A vector of model parameters.

duplication

logical scalar. Type of evolutionary event.

state

logical vector. State of the parent.

array

matrix indicating the state of the offspring (rows = function, cols = offspring).

as_log

logical scalar. When TRUE returns the log.

i, j

Locations (index from zero) of the cell to compute.

Details

conditional_prob computes the so-called "Gibbs sampling" probability, in which the likelihood of observing Y(i,j) = 1 conditional on the rest of the data is computed.