Description Usage Arguments Details Value Source See Also Examples
View source: R/DocumentationMinMax.R
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
.
1 2 3 |
object1, object2 |
two objects of class |
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)).
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.
Mogens Bladt and Bo Friis Nielsen (2017): Matrix-Exponential Distributions in Applied Probability. Probability Theory and Stochastic Modelling (Springer), Volume 81.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.