MatrixExp(mat, t = 1, n = 20, k = 3, method="pade")
mat
"pade"
for the Pade approximation, or "series"
for the
power series approximation. Ignored unless mat
has repeated
eigenvalues.t
is
a vector of length 2 or more, an array of exponentiated matrices.
where $D$ is a diagonal matrix with the eigenvalues of $M$ on the diagonal, $\exp(D)$ is a diagonal matrix with the exponentiated eigenvalues of $M$ on the diagonal, and $U$ is a matrix whose columns are the eigenvectors of $M$.
This method of calculation is used if $M$ has distinct eigenvalues. I If $M$ has repeated eigenvalues, then its eigenvector matrix may be non-invertible. In this case, the matrix exponential is calculated using the Pade approximation defined by Moler and van Loan (2003), or the less robust power series approximation,
For a continuous-time homogeneous Markov process with transition
intensity matrix
$Q$, the probability of occupying state $s$ at time $u + t$
conditional on occupying state $r$ at time $u$ is given by the
$(r,s)$ entry of the matrix $\exp(tQ)$.
The implementation of the Pade approximation was taken from
JAGS by Martyn Plummer (rmutil
(
Moler, C and van Loan, C (2003). Nineteen dubious ways to compute
the exponential of a matrix, twenty-five years later.
SIAM Review 45,
3--49.
At