smmR-package: smmR : Semi-Markov Models, Markov Models and Reliability

smmR-packageR Documentation

smmR : Semi-Markov Models, Markov Models and Reliability

Description

This package performs parametric and non-parametric estimation and simulation for multi-state discrete-time semi-Markov processes. For the parametric estimation, several discrete distributions are considered for the sojourn times: Uniform, Geometric, Poisson, Discrete Weibull and Negative Binomial. The non-parametric estimation concerns the sojourn time distributions, where no assumptions are done on the shape of distributions. Moreover, the estimation can be done on the basis of one or several sample paths, with or without censoring at the beginning or/and at the end of the sample paths. Estimation and simulation of discrete-time k-th order Markov chains are also considered.

Semi-Markov models are specified by using the functions smmparametric() and smmnonparametric() for parametric and non-parametric specifications respectively. These functions return objects of S3 class (smm, smmparametric) and (smm, smmnonparametric) respectively (smm class inherits from S3 classes smmparametric or smmnonparametric). Thus, smm is like a wrapper class for semi-Markov model specifications.

Based on a model specification (an object of class smm), it is possible to:

  • simulate one or several sequences with the method simulate.smm();

  • plot conditional sojourn time distributions (method plot.smm());

  • compute log-likelihood, AIC and BIC criteria (methods logLik(), AIC(), BIC());

  • compute reliability, maintainability, availability, failure rates (methods reliability(), maintainability(), availability(), failureRate()).

Estimations of parametric and non-parametric semi-Markov models can be done by using the function fitsmm(). This function returns an object of S3 class smmfit. The class smmfit inherits from classes (smm, smmparametric) or (smm, smmnonparametric).

Based on a fitted/estimated semi-Markov model (an object of class smmfit), it is possible to:

  • simulate one or several sequences with the method simulate.smmfit();

  • plot estimated conditional sojourn time distributions (method plot.smmfit());

  • compute log-likelihood, AIC and BIC criteria (methods logLik(), AIC(), BIC());

  • compute estimated reliability, maintainability, availability, failure rates and their confidence intervals (methods reliability(), maintainability(), availability(), failureRate()).

Notation

The models and the notation follow Barbu and Limnios (2008). The other help pages of the package only recall the notation they use.

State space

The state space is a finite set E (the vector states) with s = \textrm{card}(E) elements; when needed, the states are identified with 1, \dots, s, in the order of states.

Semi-Markov chain

A Markov renewal chain (J_n, S_n)_{n \in \mathbb{N}} (Barbu and Limnios, 2008, Definition 3.2, p. 45) is made of:

  • the successively visited states (J_n)_{n \in \mathbb{N}}, a Markov chain called the embedded Markov chain, with initial distribution \alpha (init) and transition matrix p = (p_{ij})_{i, j \in E} (ptrans), with p_{ii} = 0 (no transition to the same state);

  • the jump times (S_n)_{n \in \mathbb{N}}, 0 = S_0 < S_1 < S_2 < \dots, and the sojourn times (X_n)_{n \in \mathbb{N}^*}, X_n = S_n - S_{n - 1}, with values in \{1, 2, \dots\} (no instantaneous transition).

The semi-Markov chain (Z_k)_{k \in \mathbb{N}} gives the state at each time: Z_k = J_{N(k)}, where N(k) = \max\{n \in \mathbb{N} : S_n \le k\} is the number of jumps up to time k (Definition 3.7, p. 50). Its backward recurrence time (U_k)_{k \in \mathbb{N}}, U_k = k - S_{N(k)}, is the time already spent in the current state; the couple (Z_k, U_k)_{k \in \mathbb{N}} is a Markov chain (Section 6.2.1, p. 137).

Semi-Markov kernel and sojourn time distributions

The semi-Markov kernel (Definition 3.1, p. 44) is

q_{ij}(k) = P(J_{n + 1} = j, X_{n + 1} = k \mid J_n = i) = p_{ij} f_{ij}(k), \quad i, j \in E,\ k \in \mathbb{N},

with q_{ij}(0) = 0, where f_{ij}(k) = P(X_{n + 1} = k \mid J_n = i, J_{n + 1} = j) is the conditional sojourn time distribution (Definition 3.3, p. 46). Four types of models are considered (argument type.sojourn): f_{ij} depends on the current state i and on the next state j ("fij"), only on i ("fi", f_i), only on j ("fj", f_j), or on neither ("f", f). The sojourn time in state i has the distribution h_i(k) = \sum_{j \in E} q_{ij}(k), the cumulative distribution function H_i(k) = \sum_{l = 1}^{k} h_i(l) and the mean m_i = \sum_{k \ge 1} k\, h_i(k) (Definition 3.4, p. 47).

Transition function and limit distribution

The discrete-time convolution product of two matrix-valued functions is (A * B)(k) = \sum_{l = 0}^{k} A(k - l) B(l) (Definition 3.5, p. 48) and q^{(n)} is the n-fold convolution of q. With H(k) = \textrm{diag}(H_i(k);\ i \in E), the Markov renewal function \psi(k) = \sum_{n = 0}^{k} q^{(n)}(k) gives the transition function of the semi-Markov chain (Equation (3.33), p. 59)

P_{ij}(k) = P(Z_k = j \mid Z_0 = i), \quad P = \psi * (I - H).

The limit distribution of an ergodic semi-Markov chain is \pi_j = \nu_j m_j / \sum_{l \in E} \nu_l m_l, where \nu is the stationary distribution of the embedded Markov chain (Proposition 3.9, p. 65).

Reliability

The state space is split into up states U (upstates), with s_1 = \textrm{card}(U), and down states D = E \setminus U. T_D is the first passage time to D; the reliability is R(k) = P(T_D > k), the availability A(k) = P(Z_k \in U) and the maintainability M(k) = P(T_U \le k) (Definitions 5.1 to 5.3, pp. 104-108). The chain (Y_k)_{k \in \mathbb{N}} is equal to Z_k for k < T_D and absorbed in a state \Delta after; its kernel is q_Y and its transition function P_Y (Proposition 5.1, pp. 105-106).

Markov chains

A Markov chain (Z_n)_{n \in \mathbb{N}} of order k on E has a transition matrix ptrans of dimension (s^k, s): its rows correspond to the words of length k.

Storage of the matrix-valued functions

A matrix-valued function A on \{0, 1, \dots, k\} (kernel, H, \psi, P, ...) is stored in an array of dimension (s, s, k + 1) whose slice l + 1 is the matrix A(l), for l = 0, \dots, k. The sequences are given as a list of vectors of states.

Author(s)

Maintainer: Nicolas Vergne nicolas.vergne@univ-rouen.fr (ORCID)

Authors:

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.

R.E. Barlow, A.W. Marshall, and F. Proschan. (1963). Properties of probability distributions with monotone hazard rate. Ann. Math. Statist., 34, 375-389.

T. Nakagawa and S. Osaki. (1975). The discrete Weibull distribution. IEEE Trans. Reliabil., R-24, 300-301.

D. Roy and R. Gupta. (1992). Classification of discrete lives. Microelectron. Reliabil., 32 (10), 1459-1473.

I. Votsi & A. Brouste (2019) Confidence interval for the mean time to failure in semi-Markov models: an application to wind energy production, Journal of Applied Statistics, 46:10, 1756-1773.

See Also

Useful links:


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