Learn R Programming

VGAM (version 1.0-1)

Yules: Yule-Simon Distribution

Description

Density, distribution function, quantile function and random generation for the Yule-Simon distribution.

Usage

dyules(x, rho, log = FALSE)
pyules(q, rho, log.p = FALSE)
ryules(n, rho)

Arguments

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 runif.
rho
log
logical; if TRUE, the logarithm is returned.
log.p
Same meaning as in pnorm or qnorm.

Value

  • dyules gives the density, pyules gives the distribution function, and ryules generates random deviates.

Details

See yulesimon, the VGAM family function for estimating the parameter, for the formula of the probability density function and other details.

See Also

yulesimon.

Examples

Run this code
dyules(1:20, 2.1)
ryules(20, 2.1)

round(1000 * dyules(1:8, 2))
table(ryules(1000, 2))

x <- 0:6
plot(x, dyules(x, rho = 2.2), type = "h", las = 1, col = "blue")

Run the code above in your browser using DataLab