Given a stochastic matrix, return the rate matrix (infinitesimal generator) that would generate it when exponentiated over the interval of unit time.
movement_prob2rate(tau)
tau | a row normalized stochastic matrix |
---|
a list with two elements: gamma
negative diagonal of the rate
matrix, mat
matrix of row normalized off-diagonal elements
Warning: if the matrix provided has diagonal-only rows (i.e., the location is independent), the rate matrix will return 0 in that row, as there is no movement rate that can generate that scenario.