Reward transforming a continuous phase-type distribution with initial distribution
initDist
and sub-intensity rate matrix T_Mat
.
RewTransDistribution(object, rewards)
object | a continuous phase-type distributed object of class |
---|---|
rewards | a non-negative reward vector. The length of the reward vector
should be equal to the number of rows of the sub-intensity rate matrix |
Mogens Bladt and Bo Friis Nielsen (2017): Matrix-Exponential Distributions in Applied Probability. Probability Theory and Stochastic Modelling (Springer), Volume 81.
The function returns the reward transformed phase-type distribution,
which is again an object of type contphasetype
.
It is possible to assign a linear (non-negative) reward to each of the transient states
of the Markov jump process underlying the phase-type distribution under consideration.
More precisely, a reward is earned in each transient state and that reward is
proportional to the time spent in the state. By assigning rewards, the original
phase-type distribution is transformed into another continuous phase-type distribution.
More details on the reward transformation can be found in vignette("PhaseTypeGenetics")
or in Mogens Bladt and Bo Friis Nielsen (2017):
Matrix-Exponential Distributions in Applied Probability.
## The time to the most recent common ancestor (T_MRCA) ## is phase-type distributed with initial distribution initDist <- c(1,0,0,0) ## and sub-intensity rate matrix T_Mat <- matrix(c(-6,6,0,0, 0,-3,2,1, 0,0,-1,0, 0,0,0,-1), nrow = 4, byrow = TRUE) ## Defining an object of type "contphasetype" TMRCA <- contphasetype(initDist, T_Mat) ## In order to obtain the distribution of the total ## length of all branches giving rise to singletons, ## we have to give the following rewards to the ## different states r.vec <- c(4,2,1,0) ## Hence, RewTransDistribution(TMRCA,r.vec)#> $initDist #> [,1] [,2] [,3] #> [1,] 1 0 0 #> #> $T_Mat #> [,1] [,2] [,3] #> [1,] -1.5 1.5 0 #> [2,] 0.0 -1.5 1 #> [3,] 0.0 0.0 -1 #> #> attr(,"class") #> [1] "contphasetype"