This is a wrapper around msm::MatrixExp() that computes the exponential of multiple square matrices.

expmat(x, t = 1, ...)

Arguments

x

An array of matrices.

t

An optional scaling factor for x.

...

Arguments to pass to msm::MatrixExp().

Value

Returns an array of exponentiated matrices. If length(t) > 1, then length(t) arrays are returned for each element in x.

Details

This function is most useful when exponentiating transition intensity matrices to produce transition probability matrices. To create transition probability matrices for discrete time state transition models with annual cycles, set t=1. An array of matrices is returned which can be used to create the value element of a tparams_transprobs object. See qmatrix() for an example.