Computing the state space and the corresponding rate matrix for the block counting process for a given sample size \(n\) in the standard coalescent model.
BlockCountProcess(n)
n | the sample size (>=1) |
---|
The function returns a list containing the sub-intensity
rate matrix Rate_Mat
and the state space matrix StateSpace_Mat
.
In the latter, each row corresponds to a state and each state is a
\((n-1)\)-dimensional row vector.
For a given sample size \(n\), one can have one or more possible coalescent trees. Each coalescent event in these trees correspond to a state of the block counting process. Furthermore, each state is represented by a \((n-1)\)- dimensional row vector, where each entry \(i\) corresponds to the number of branches giving rise to \(i\) descendants. Hence, state 1 is always a vector of the form \((n,0,0,...,0)\), and state 2 is always given by the vector \((n-2,1,0,...,0)\) eqn(n >= 3).
a <- BlockCountProcess(4) a$Rate_Mat#> [,1] [,2] [,3] [,4] #> [1,] -6 6 0 0 #> [2,] 0 -3 2 1 #> [3,] 0 0 -1 0 #> [4,] 0 0 0 -1a$StateSpace_Mat#> [,1] [,2] [,3] #> [1,] 4 0 0 #> [2,] 2 1 0 #> [3,] 1 0 1 #> [4,] 0 2 0