MPH_functions: The Multivariate Continuous Phase-Type Distribution

Description Usage Arguments Details Value Functions See Also Examples

Description

The Multivariate Continuous Phase-Type Distribution

Usage

1
2
3
4
5
6
7
dMPH(x, obj)

qMPH(p, obj)

pMPH(q, obj)

rMPH(n, obj)

Arguments

x, q

vector of quantiles.

obj

an object of class mult_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 dMPH, qMPH and pMPH, 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

dMPH gives the density, pMPH gives the distribution function, qMPH gives the quantile function, and rMPH generates random deviates.

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

See Also

Distributions for other standard distributions.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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)
rMPH(6, Y)

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