expmat {hesim} | R Documentation |
Matrix exponential
Description
This is a wrapper around msm::MatrixExp()
that computes the exponential
of multiple square matrices.
Usage
expmat(x, t = 1, ...)
Arguments
x |
An array of matrices. |
t |
An optional scaling factor for |
... |
Arguments to pass to |
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.
Value
Returns an array of exponentiated matrices. If length(t) > 1
, then
length(t)
arrays are returned for each element in x
.
See Also
qmatrix.msm()
, qmatrix.data.table()
[Package hesim version 0.5.4 Index]