minima: Minima and maxima of phase-type distributions

Description Usage Arguments Details Value Source See Also Examples

View source: R/DocumentationMinMax.R

Description

Computes the minima and maxima of two independent discrete or continuous phase-type distributed variables with initial distributions initDist1 and initDist2 as well as sub-transition/sub-intensity matrices equal to P_Mat1/T_Mat1 and P_Mat2/T_Mat2.

Usage

1
2
3
minima(object1, object2)

maxima(object1, object2)

Arguments

object1, object2

two objects of class discphasetype or contphasetype for which the maximum or minimum should be computed.

Details

In the discrete case, the minimum and maximum of two phase-type distributed variables tau1 ~ DPH_p(α,S) and tau2 ~ DPH_q(β,T) are defined as follows

min(tau1, tau2) ~ DPH_{pq}( kronecker(α,β), kronecker(S,T) ),

and

max(tau1, tau2) ~ DPH_{pq + p + q}( c(kronecker(α,β),0_vec), K ),

where 0_vec is a vector of length p+q with zero in each entry and

K= rbind( cbind(kronecker(S,T), kronecker(S,t),kronecker(s,T) ), cbind(matrix(0, ncol = p*q, nrow = p), S , matrix(0, ncol = q, nrow = p)), cbind(matrix(0, ncol = p*q, nrow = q), matrix(0, ncol = p, nrow = q), T)).

In the continuous case, the minima and maxima of two phase-type distributed variables X ~ PH_p(α,S) and Y ~ PH_q(β,T) is given in the following way

min(X, Y) ~ PH( kronecker(α,β), kronecker(S,T) ),

and

max(X, Y) ~ PH( c(kronecker(alpha,beta),0_vec), K ),

where 0_vec is a vector of length p+q with zero in each entry and

K= rbind( cbind(kronecker(S,T), kronecker(I,t),kronecker(s,I) ), cbind(matrix(0, ncol = p*q, nrow = p), S , matrix(0, ncol = q, nrow = p)), cbind(matrix(0, ncol = p*q, nrow = q), matrix(0, ncol = p, nrow = q), T)).

Value

The function minima returns an object of type discphasetype or contphasetype (depending on the input) holding the phase-type representation of the minimum of the input objects, while maxima returns an object of type discphasetype or contphasetype that holds the phase-type representation of the maximum of the input objects.

Source

Mogens Bladt and Bo Friis Nielsen (2017): Matrix-Exponential Distributions in Applied Probability. Probability Theory and Stochastic Modelling (Springer), Volume 81.

See Also

min or max.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Two representations of the total branch length
## are given by
T_Total1 <- matrix(c(-1.5, 1.5, 0,
                     0, -1, 1,
                     0, 0, -0.5), nrow = 3, byrow = TRUE)

T_Total2 <- matrix(c(-1.5, 1.5, 0, 0,
                     0, -1, 2/3, 1/3,
                     0, 0, -0.5, 0,
                     0, 0, 0, -0.5), nrow = 4, byrow = TRUE)

## Defining two objects of type "contphasetype".
T_Total1 <- contphasetype(initDist = c(1,0,0), T_Total1)
T_Total2 <- contphasetype(initDist = c(1,0,0,0), T_Total2)

## Computing the minimum and maximum
minima(T_Total1, T_Total2)
maxima(T_Total1, T_Total2)

aumath-advancedr2019/PhaseTypeGenetics documentation built on Dec. 3, 2019, 7:16 a.m.