# explogUC: The Exponential Logarithmic Distribution In VGAM: Vector Generalized Linear and Additive Models

 explog R Documentation

## The Exponential Logarithmic Distribution

### Description

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

### Usage

``````dexplog(x, scale = 1, shape, log = FALSE)
pexplog(q, scale = 1, shape)
qexplog(p, scale = 1, shape)
rexplog(n, scale = 1, shape)
``````

### Arguments

 `x, q` vector of quantiles. `p` vector of probabilities. `n` number of observations. If `length(n) > 1` then the length is taken to be the number required. `scale, shape` positive scale and shape parameters. `log` Logical. If `log = TRUE` then the logarithm of the density is returned.

### Details

See `explogff`, the VGAM family function for estimating the parameters, for the formula of the probability density function and other details.

### Value

`dexplog` gives the density, `pexplog` gives the distribution function, `qexplog` gives the quantile function, and `rexplog` generates random deviates.

### Note

We define `scale` as the reciprocal of the scale parameter used by Tahmasabi and Rezaei (2008).

### Author(s)

J. G. Lauder and T. W. Yee

`explogff`, `exponential`.

### Examples

``````## Not run:
shape <- 0.5; scale <- 2; nn <- 501
x <- seq(-0.50, 6.0, len = nn)
plot(x, dexplog(x, scale, shape), type = "l", las = 1, ylim = c(0, 1.1),
ylab = paste("[dp]explog(shape = ", shape, ", scale = ", scale, ")"),
col = "blue", cex.main = 0.8,
main = "Blue is density, orange is cumulative distribution function",
sub = "Purple lines are the 10,20,...,90 percentiles")
lines(x, pexplog(x, scale, shape), col = "orange")
probs <- seq(0.1, 0.9, by = 0.1)
Q <- qexplog(probs, scale, shape = shape)
lines(Q, dexplog(Q, scale, shape = shape), col = "purple", lty = 3, type = "h")
lines(Q, pexplog(Q, scale, shape = shape), col = "purple", lty = 3, type = "h")
abline(h = probs, col = "purple", lty = 3)
max(abs(pexplog(Q, scale, shape = shape) - probs)) # Should be 0

## End(Not run)
``````

VGAM documentation built on Sept. 19, 2023, 9:06 a.m.