50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

Newdistns (version 1.0)

mog: Marshall Olkin G distribution

Description

Computes the pdf, cdf, quantile and random numbers of the Marshall Olkin distribution due to Marshall and Olkin (1997) specified by the pdf βg(x)[1(1β)G(x)]2 for $G$ any valid cdf, $g$ the corresponding pdf and $\beta > 0$, the scale parameter.

Usage

dmog(x, spec, beta = 1, log = FALSE, ...)
pmog(x, spec, beta = 1, log.p = FALSE, lower.tail = TRUE, ...)
qmog(p, spec, beta = 1, log.p = FALSE, lower.tail = TRUE, ...)
rmog(n, spec, beta = 1, ...)

Arguments

x
scaler or vector of values at which the pdf or cdf needs to be computed
p
scaler or vector of values at which the quantile needs to be computed
n
number of random numbers to be generated
beta
the value of the scale parameter, must be positive, the default is 1
spec
a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).
log
if TRUE then log(pdf) are returned
log.p
if TRUE then log(cdf) are returned and quantiles are computed for exp(p)
lower.tail
if FALSE then 1-cdf are returned and quantiles are computed for 1-p
...
other parameters

Value

  • An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated.

References

S. Nadarajah, Newdistns: An R Package for new families of distributions, submitted A. W. Marshall, I. Olkin, A new method for adding a parameter to a family of distributions with application to the exponential and Weibull families, Biometrika 84 (1997) 641-652

Examples

Run this code
x=runif(10,min=0,max=1)
dmog(x,"exp",beta=1)
pmog(x,"exp",beta=1)
qmog(x,"exp",beta=1)
rmog(10,"exp",beta=1)

Run the code above in your browser using DataLab