Markovstat: Stationary distribution calculation for processes with...

View source: R/Markovchart_functions_20220203.r

MarkovstatR Documentation

Stationary distribution calculation for processes with fixed/random shift size, random repair and random sampling time.

Description

Calculates the stationary distribution of a process described by a discrete state, discrete time Markov chain. The process is described by a degradation-repair cycle type model. The user must give parameters describing both the degradation and the repair. The process is not repaired until the problem is discovered by sampling, hence the control chart setup. The same, single element is monitored (i.e. the sample size is always 1).

Usage

Markovstat(shiftfun = c("exp", "exp-geo", "deg"), h, k, sigma,
           s, delta, probmix = 0, probnbin = 0.5, disj = 1,
           RanRep = FALSE, alpha = NULL, beta = NULL,
           RanSam = FALSE, StateDep = FALSE, a = NULL,
           b = NULL, q = NULL, z = NULL, Vd = 100, V,
           Qparam = 30)

Arguments

shiftfun

A string defining the shift size distribution to be used. Must be either "exp" (exponential), "exp-geo" (exponential-geometric mixture) or "deg" (degenerate). Use "deg" for fixed shift size with perfect repair and guaranteed sampling, i.e. Duncan"s traditional cycle model.

h

The time between samplings. Must be a positive value.

k

The control limit (critical value). Must be a positive value. Only one sided shifts are allowed, thus there is only one control limit.

sigma

Process standard deviation (the distribution is assumed to be normal).

s

Expected number of shifts in an unit time interval.

delta

Expected shift size. Used as the parameter of the exponential distribution (shiftfun="exp" or "exp-geo"), or simply as the size of the shift (shiftfun="deg").

probmix

The weight of the geometric distribution in case of exponential-geometric mixture shift distribution; should be between 0 and 1.

probnbin

The probability parameter of the geometric distribution in case of exponential-geometric mixture shift distribution; should be between 0 and 1.

disj

The size of a discrete jump in case of exponential-geometric mixture shift distribution, must be a positive number.

RanRep

Logical. Should the repair be random? Default is FALSE (the repair is perfect, the process is always repaired to the target value). The repair is always perfect (non-random) for shiftfun="deg".

alpha

First shape parameter for the random repair beta distribution.

beta

Second shape parameter for the random repair beta distribution.

RanSam

Logical. Should the sampling be random? Default is FALSE (no). The sampling is never random for shiftfun="deg".

StateDep

Logical. Should the sampling probability also depend on the distance from the target value (state dependency)? (If TRUE, a beta distribution is used for the sampling probability, if FALSE then a logistic function.)

a

First parameter*h for the random sampling time beta distribution. The first shape parameter is a/h to create dependency on the time between samplings as described at the StateDep parameter.

b

Second shape parameter for the random sampling time beta distribution.

q

The steepness of the curve of the random sampling time logistic function.

z

The logistic sigmoid"s midpoint of the random sampling time logistic function.

Vd

Integer discretisation parameter: the number of states in the equidistant discretisation of the state space. Should be an integer value greater than 2.

V

Numeric discretisation parameter: the maximum (positive) distance from the target value taken into account.

Qparam

Integer discretisation parameter: the number of maximum events taken into account within a sampling interval.

Value

The function return a list object of class Markov_stationary. The list is of length 3:

Stationary_distribution

Stationary distribution of the Markov chain. The probabilities in the stationary distribution are labeled. If shiftfun is "deg" then the stationary distribution is always of length 4. If shiftfun is not "deg" then there are multiple out-of-control (OOC) and true alarm states. These are labeled with an index and the value the state represents. If shiftfun is "deg" then the out-of-control and true alarm states are at a distance delta from the target value, and the in-control and the false alarm state are always at the target value.

Transition_matrix

The transition matrix of the Markov chain. Not printed.

Param_list

Parameters given to the function and various technical results used by the Markovchart function. Not printed.

Author(s)

Balazs Dobi and Andras Zempleni

References

Zempleni A, Veber M, Duarte B and Saraiva P. (2004) Control charts: a cost-optimization approach for processes with random shifts. Applied Stochastic Models in Business and Industry, 20(3), 185-200.

Dobi B and Zempleni A. (2019) Markov chain-based cost-optimal control charts for health care data. Quality and Reliability Engineering International, 35(5), 1379-1395.

Dobi B and Zempleni A. (2019) Markov chain-based cost-optimal control charts with different shift size distributions. Annales Univ. Sci. Budapest., Sect. Comp., 49, 129-146.

See Also

Markovchart

Examples

#Fixed shift size (essentially Duncan's cycle model).
res1 <- Markovstat(shiftfun="deg", h=1, k=1, sigma=1, s=0.2, delta=2.5)
res1

#Exponential shift - perfect repair - deterministic sampling
res2 <- Markovstat(shiftfun="exp", h=1, k=1, sigma=1, s=0.2, delta=2, Vd=30, V=18)
res2
#Notice how the In-control and the False-alarm states have non-zero probabilities.
#If the repair would be random (RanRep=TRUE), then these states would have zero probability.

#Exponential-geometric mixture shift - random repair - random sampling.
res3 <- Markovstat(shiftfun='exp-geo', h=1.5, k=2, sigma=1, s=0.2,
                   delta=1.2, probmix=0.7, probnbin=0.8, disj=2,
                   RanRep=TRUE, alpha=1, beta=3, RanSam=TRUE,
                   StateDep=TRUE, a=1, b=15, Vd=40, V=8)
res3

Markovchart documentation built on April 10, 2022, 1:06 a.m.