| Log {VGAM} | R Documentation |
Density, distribution function, and random generation for the logarithmic distribution.
dlog(x, prob, log = FALSE) plog(q, prob, log.p = FALSE) rlog(n, prob, Smallno = 1.0e-6)
x, q |
Vector of quantiles. For the density, it should be a vector with positive integer values in order for the probabilities to be positive. |
n |
number of observations.
Same as in |
prob |
The parameter value c described in in |
log, log.p |
Logical.
If |
Smallno |
Numeric, a small value used by the rejection method for determining
the upper limit of the distribution.
That is, |
The details are given in logff.
dlog gives the density,
plog gives the distribution function, and
rlog generates random deviates.
Given some response data, the VGAM family function
logff estimates the parameter prob.
For plog(), if argument q contains large values
and/or q is long in length
then the memory requirements may be very high.
Very large values in q are handled by an approximation by
Owen (1965).
T. W. Yee
Forbes, C., Evans, M., Hastings, N. and Peacock, B. (2011) Statistical Distributions, Hoboken, NJ, USA: John Wiley and Sons, Fourth edition.
dlog(1:20, 0.5)
rlog(20, 0.5)
## Not run: prob <- 0.8; x <- 1:10
plot(x, dlog(x, prob = prob), type = "h", ylim = 0:1,
sub = "prob=0.8", las = 1, col = "blue", ylab = "Probability",
main = "Logarithmic distribution: blue=density; orange=distribution function")
lines(x + 0.1, plog(x, prob = prob), col = "orange", lty = 3, type = "h")
## End(Not run)