get.psi: Markov renewal function psi of a semi-Markov kernel

View source: R/get.psi.R

get.psiR Documentation

Markov renewal function ψ of a semi-Markov kernel

Description

Computes, from a semi-Markov kernel q, the matrix-valued function \psi (Barbu and Limnios, 2008, Proposition 3.4, Equations (3.14)-(3.16), p. 53):

\psi(k) = \sum_{n = 0}^{k} q^{(n)}(k), \quad k \in \mathbb{N},

where q^{(n)} is the n-fold matrix convolution of q (see matrixConvolution) and q^{(0)} = \delta I.

Usage

get.psi(q)

Arguments

q

A numeric array of dimension (s, s, k + 1), where s = \textrm{card}(E), giving the values of a semi-Markov kernel at times 0, \dots, k, typically the output of get.kernel (or of get.qy).

Details

Notation (see smmR-package for the complete description of the models): (J_n)_{n \in \mathbb{N}} is the embedded Markov chain, (S_n)_{n \in \mathbb{N}} the jump times, q the semi-Markov kernel and s = \textrm{card}(E).

\psi_{ij}(k) is the probability that the semi-Markov chain enters state j at time k (i.e. that a jump to j occurs at time k), given that it entered state i at time 0 (Equation (3.19), p. 54):

\psi_{ij}(k) = P\left(\bigcup_{n = 0}^{k} \{J_n = j, S_n = k\} \,\middle|\, J_0 = i\right).

Since there are no instantaneous transitions (q(0) = 0), the sum is finite and \psi is computed exactly by the recursion

\psi(0) = I, \quad \psi(k) = \sum_{l = 0}^{k - 1} \psi(l)\, q(k - l), \quad k \ge 1,

which is the solution of the Markov renewal equation \psi = \delta I + \psi * q. \psi is the inverse of \delta I - q for the matrix convolution product, and the transition function of the semi-Markov chain is P = \psi * (I - H) (see get.P).

Value

A numeric array of dimension (s, s, k + 1) whose slice l + 1 is the matrix \psi(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

get.kernel, matrixConvolution, get.H, 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 = 20)
psi <- get.psi(q)
psi[, , 4]                                   # psi(3)

# psi is the sum of the n-fold convolutions of q
qn <- q
s <- array(0, dim(q)); s[, , 1] <- diag(3)    # q^(0)
for (n in 1:20) {
  s <- s + qn
  qn <- matrixConvolution(qn, q)
}
all.equal(s, psi)


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