Learn R Programming

hesim (version 0.5.5)

expmat: Matrix exponential

Description

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

Usage

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

Value

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

Arguments

x

An array of matrices.

t

An optional scaling factor for x.

...

Arguments to pass to msm::MatrixExp().

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.

See Also

qmatrix.msm(), qmatrix.data.table()