DPH_functions: The Univariate Discrete Phase-Type Distribution

Description Usage Arguments Details Value Functions See Also Examples

Description

The Univariate Discrete Phase-Type Distribution

Usage

1
2
3
4
5
6
7
8
9
dDPH(x, obj)

qDPH(p, obj)

pDPH(q, obj)

rDPH(n, obj)

rFullDPH(obj)

Arguments

x, q

vector of quantiles.

obj

an object of class disc_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 dDPH, qDPH and pDPH, 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

dDPH gives the density, pDPH gives the distribution function, qDPH gives the quantile function, and rDPH generates random deviates.

The length of the result is determined by n for rDPH, 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
disc_phase_type <- matrix(c(0.4, 0, 0.2,
                            0.5, 0.3, 0.2,
                            0, 0.7, 0.2), ncol = 3)
Y <- DPH(disc_phase_type)

dDPH(3:4, Y)
pDPH(5, Y)
qDPH(0.5, Y)
set.seed(0)
rDPH(6, Y)
rFullDPH(Y)

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