expmat: Matrix exponential

View source: R/tpmatrix.R

expmatR 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 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.

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()


dincerti/cea documentation built on Feb. 16, 2024, 1:15 p.m.