PH_functions: The Univariate Continuous Phase-Type Distribution

Description Usage Arguments Details Value Functions See Also Examples

Description

The Univariate Continuous Phase-Type Distribution

Usage

1
2
3
4
5
6
7
8
9
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 cont_phase_type.

p

vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

Details

If the object provided is multivariate, each row of the result will corresponds to each univariate reward transformation. For dPH, qPH and pPH, 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.

Value

dPH gives the density, pPH gives the distribution function, qPH gives the quantile function, and rPH generates random deviates.

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

See Also

Distributions for other standard distributions.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)

rivasiker/phasty documentation built on June 15, 2021, 9:18 p.m.