Skip to contents

Density, distribution function, quantile function and random generation for on the Muth distribution.

Usage

domd(x, alpha, log = FALSE)

pomd(q, alpha, lower.tail = TRUE, log.p = FALSE)

qomd(p, alpha, lower.tail = TRUE)

romd(n, alpha)

Arguments

x, q

vector of quantiles.

alpha

a parameter.

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are \(P\left[ X\leq x\right]\), otherwise, \(P\left[ X>x\right] \).

p

vector of probabilities.

n

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

Value

domd gives the density, pomd gives the distribution function, qomd gives the quantile function and romd generates random deviates.

Details

The Muth distribution with a parameter \(\alpha\), has density $$f\left( x\right) =\left( e^{\alpha x}- \alpha \right) e^{\alpha x-\left(1/\alpha \right) \left( e^{\alpha x}- 1\right) },$$ where $$x>0,~\alpha \in \left( 0,1\right]. $$

References

Jodrá, P., Jiménez-Gamero, M. D. ve Alba-Fernández, M. V., 2015, On the Muth distribution, Mathematical Modelling and Analysis, 20 (3), 291-310.

Examples

library(new.dist)
domd(1,alpha=.2)
#> [1] 0.4123689
pomd(1,alpha=.2)
#> [1] 0.596272
qomd(.8,alpha=.1)
#> [1] 1.631923
romd(10,alpha=1)
#>  [1] 0.7860234 0.5427012 0.9586716 1.1135001 0.5910447 0.6944185 1.0922210
#>  [8] 0.8530497 1.2869223 0.8826189