PH_functions | R Documentation |
Density, distribution function, quantile function and random generation for the univariate continuous phase-type distribution.
dPH(x, obj)
qPH(p, obj)
pPH(q, obj)
rPH(n, obj)
rFullPH(obj)
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. |
dPH
gives the density, pPH
gives the
distribution function, qPH
gives the quantile function,
and rPH
generates random deviates. rFullPH
returns
the full path of a random draw from the distribution.
The length of the result is determined by n
for rPH
,
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.
dPH()
: Density function for the univariate continuous phase-type distribution.
qPH()
: Quantile function for the univariate continuous phase-type distribution.
pPH()
: Distribution function for the univariate continuous phase-type distribution.
rPH()
: Random number generator for the univariate continuous phase-type distribution.
rFullPH()
: Simulation of the full path for the univariate continuous phase-type distribution.
Distributions for other standard distributions.
cont_phase_type <- matrix(c(-3, 0, 1,
2, -3, 1,
1, 1, -2), ncol = 3)
Y <- PH(cont_phase_type)
dPH(3:4, Y)
pPH(1.45, Y)
qPH(0.5, Y)
set.seed(0)
rPH(6, Y)
rFullPH(Y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.