matrixConvolution: Discrete-time matrix convolution product

View source: R/matrixConvolution.R

matrixConvolutionR Documentation

Discrete-time matrix convolution product

Description

Computes the discrete-time convolution product A * B of two matrix-valued functions A and B defined on \mathbb{N} (Barbu and Limnios, 2008, Definition 3.5, p. 48):

(A * B)(k) = \sum_{l = 0}^{k} A(k - l)\, B(l), \quad k \in \mathbb{N},

where A(k - l) B(l) is the usual matrix product.

Usage

matrixConvolution(a, b)

Arguments

a

A numeric array of dimension (s, s, k + 1).

b

A numeric array of dimension (s, s, k + 1).

Details

Notation (see smmR-package for the complete description of the models): s = \textrm{card}(E) is the number of states, and a matrix-valued function on \{0, \dots, k\} is an array of dimension (s, s, k + 1) whose slice l + 1 is its value at time l.

The slice l + 1 of a (or b) is the matrix A(l) (or B(l)), for l = 0, \dots, k. This is the format of the kernel returned by get.kernel and of the outputs of get.H, get.psi and get.P.

The matrix convolution product is associative but not commutative. Its neutral element is \delta I, i.e. the identity matrix at time 0 and the null matrix at times k > 0 (Lemma 3.1, p. 48). The n-fold convolution of the semi-Markov kernel, q^{(n)} (Definition 3.6, p. 48), is obtained by applying this function n - 1 times (see get.psi).

Value

A numeric array of dimension (s, s, k + 1) whose slice l + 1 is the matrix (A * B)(l), for l = 0, \dots, k.

References

V. S. Barbu, N. Limnios. (2008). Semi-Markov Chains and Hidden Semi-Markov Models Toward Applications - Their Use in Reliability and DNA Analysis. New York: Lecture Notes in Statistics, vol. 191, Springer.

See Also

convolution, get.kernel, get.psi, get.P

Examples

states <- c("a", "b", "c")
ptrans <- matrix(c(0, 0.6, 0.4,
                   0.5, 0, 0.5,
                   0.7, 0.3, 0), nrow = 3, byrow = TRUE)
param <- matrix(c(0.3, 2, 0.6,
                  NA, NA, 0.8), nrow = 3)
x <- smmparametric(states = states, init = c(1/3, 1/3, 1/3),
                   ptrans = ptrans, type.sojourn = "fi",
                   distr = c("geom", "pois", "dweibull"), param = param)

q <- get.kernel(x, k = 10)
q2 <- matrixConvolution(q, q)   # q^(2): two jumps
q2[, , 4]                       # probabilities of two jumps at time 3


smmR documentation built on Nov. 28, 2026, 1:06 a.m.