Hyperexponential {boodist} | R Documentation |
Hyperexponential distribution
Description
A R6 class to represent a hyperexponential distribution.
Details
See Wikipedia.
Active bindings
probs
Get or set the value of
probs
.rates
Get or set the value of
rates
.
Methods
Public methods
Method new()
New hyperexponential distribution.
Usage
Hyperexponential$new(probs, rates)
Arguments
probs
probabilities (weights), a vector of positive numbers
rates
rate parameters, vector of positive numbers of the same length as the
probs
vector
Returns
A Hyperexponential
object.
Method d()
Density function of the hyperexponential distribution.
Usage
Hyperexponential$d(x)
Arguments
x
vector of positive numbers
Returns
The density evaluated at x
.
Method p()
Cumulative distribution function of the hyperexponential distribution.
Usage
Hyperexponential$p(q, lower = TRUE)
Arguments
q
numeric vector of quantiles
lower
Boolean, whether to deal with the lower tail
Returns
The cumulative probabilities corresponding to q
.
Method q()
Quantile function of the hyperexponential distribution.
Usage
Hyperexponential$q(p, lower = TRUE)
Arguments
p
numeric vector of probabilities
lower
Boolean, whether to deal with the lower tail
Returns
The quantiles corresponding to p
.
Method r()
Sampling from the hyperexponential distribution.
Usage
Hyperexponential$r(n)
Arguments
n
number of simulations
Returns
A numeric vector of length n
.
Method mean()
Mean of the hyperexponential distribution.
Usage
Hyperexponential$mean()
Returns
The mean of the hyperexponential distribution.
Method mode()
Mode of the hyperexponential distribution.
Usage
Hyperexponential$mode()
Returns
The mode of the hyperexponential distribution.
Method sd()
Standard deviation of the hyperexponential distribution.
Usage
Hyperexponential$sd()
Returns
The standard deviation of the hyperexponential distribution.
Method variance()
Variance of the hyperexponential distribution.
Usage
Hyperexponential$variance()
Returns
The variance of the hyperexponential distribution.
Method skewness()
Skewness of the hyperexponential distribution.
Usage
Hyperexponential$skewness()
Returns
The skewness of the hyperexponential distribution.
Method kurtosis()
Kurtosis of the hyperexponential distribution.
Usage
Hyperexponential$kurtosis()
Returns
The kurtosis of the hyperexponential distribution.
Method kurtosisExcess()
Kurtosis excess of the hyperexponential distribution.
Usage
Hyperexponential$kurtosisExcess()
Returns
The kurtosis excess of the hyperexponential distribution.
Method clone()
The objects of this class are cloneable with this method.
Usage
Hyperexponential$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.