herlang {mapfit} | R Documentation |
Create HErlang distribution
Description
Create an instance of Hyper-Erlang distribution
Usage
herlang(
size,
shape,
mixrate = rep(1/length(shape), length(shape)),
rate = rep(1, length(shape))
)
Arguments
size |
An integer of the number of phases |
shape |
A vector of shape parameters |
mixrate |
A vector of initial probability (mixrate) |
rate |
A vector of rate parameters |
Value
An instance of HErlang
Note
If shape is given, shape is used even though size is set.
Examples
## create a hyper Erlang consisting of two Erlang
## with shape parameters 2 and 3.
(param1 <- herlang(shape=c(2,3)))
## create a hyper Erlang with specific parameters
(param2 <- herlang(shape=c(2,3), mixrate=c(0.3,0.7), rate=c(1.0,10.0)))
## convert to a general PH
as.gph(param2)
## p.d.f. for 0, 0.1, ..., 1
(dphase(x=seq(0, 1, 0.1), ph=param2))
## c.d.f. for 0, 0.1, ..., 1
(pphase(q=seq(0, 1, 0.1), ph=param2))
## generate 10 samples
(rphase(n=10, ph=param2))
[Package mapfit version 1.0.0 Index]