Learn R Programming

VGAM (version 1.0-3)

Log: Logarithmic Distribution

Description

Density, distribution function, quantile function, and random generation for the logarithmic distribution.

Usage

dlog(x, shape, log = FALSE)
plog(q, shape, log.p = FALSE)
qlog(p, shape)
rlog(n, shape)

Arguments

x, q, p, n

Same interpretation as in runif.

shape

The shape parameter value \(c\) described in in logff.

log, log.p

Logical. If log.p = TRUE then all probabilities p are given as log(p).

Value

dlog gives the density, plog gives the distribution function, qlog gives the quantile function, and rlog generates random deviates.

Details

The details are given in logff.

References

Forbes, C., Evans, M., Hastings, N. and Peacock, B. (2011) Statistical Distributions, Hoboken, NJ, USA: John Wiley and Sons, Fourth edition.

See Also

logff, Oilog. Otlog.

Examples

Run this code
# NOT RUN {
dlog(1:20, 0.5)
rlog(20, 0.5)

# }
# NOT RUN {
 shape <- 0.8; x <- 1:10
plot(x, dlog(x, shape = shape), type = "h", ylim = 0:1,
     sub = "shape=0.8", las = 1, col = "blue", ylab = "shape",
     main = "Logarithmic distribution: blue=density; orange=distribution function")
lines(x + 0.1, plog(x, shape = shape), col = "orange", lty = 3, type = "h") 
# }

Run the code above in your browser using DataLab