PH_functions {PhaseTypeR} | R Documentation |
The Univariate Continuous Phase-Type Distribution
Description
Density, distribution function, quantile function and random generation for the univariate continuous phase-type distribution.
Usage
dPH(x, obj)
qPH(p, obj)
pPH(q, obj)
rPH(n, obj)
rFullPH(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
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.
Functions
-
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.
See Also
Distributions for other standard distributions.
Examples
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)