MPH_functions {PhaseTypeR} | R Documentation |
The Multivariate Continuous Phase-Type Distribution
Description
Density, distribution function, quantile function and random generation for the multivariate continuous phase-type distribution.
Usage
dMPH(x, obj)
qMPH(p, obj)
pMPH(q, obj)
rMPH(n, obj)
rFullMPH(obj)
Arguments
x , q |
vector of quantiles. |
obj |
an object of class |
p |
vector of probabilities. |
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
Value
dMPH
gives the density, pMPH
gives the
distribution function, qMPH
gives the quantile function,
and rMPH
generates random deviates. rFullMPH
returns
the full path of a random draw from the distribution.
Each row of the result of For dMPH
, pMPH
, qMPH
, and
rMPH
corresponds to each univariate reward transformation.
For dMDPH
, qMDPH
and pMDPH
, the inputs x
,
p
and q
can be matrices where in row i the i_th reward
transformation and in col j the j_th value of x
, p
or q
tested.
The length of the result is determined by n
for rMPH
,
and is the maximum of the lengths of the numerical arguments for the other
functions.
The numerical arguments other than n
are recycled to the length of the
result. Only the first elements of the logical arguments are used.
Functions
-
dMPH
: Density function for the multivariate continuous phase-type distribution. -
qMPH
: Quantile function for the multivariate continuous phase-type distribution. -
pMPH
: Distribution function for the multivariate continuous phase-type distribution. -
rMPH
: Random number generator for the multivariate continuous phase-type distribution. -
rFullMPH
: Simulation of the full path for the multivariate continuous phase-type distribution.
See Also
Distributions for other standard distributions.
Examples
cont_phase_type <- matrix(c(-3, 0, 1,
2, -3, 1,
1, 1, -2), ncol = 3)
R <- matrix(c(0, 1, 1, 2,
2, 1, 5, 2,
0, 1, 10, 2), nrow = 3, ncol=4, byrow=TRUE)
Y <- MPH(cont_phase_type, reward_mat = R)
dMPH(3:4, Y)
pMPH(1.45, Y)
qMPH(0.5, Y)
set.seed(0)
rMPH(6, Y)
rFullMPH(Y)