yulesimonUC.RdDensity, distribution function, quantile function and random generation for the Yule-Simon distribution.
dyules(x, shape, log = FALSE)
pyules(q, shape, lower.tail = TRUE, log.p = FALSE)
qyules(p, shape)
ryules(n, shape)See yulesimon, the VGAM family function
for estimating the parameter,
for the formula of the probability density function
and other details.
dyules gives the density,
pyules gives the distribution function,
qyules gives the quantile function, and
ryules generates random deviates.
Numerical problems may occur with
qyules() when p is very close to 1.
dyules(1:20, 2.1)
#> [1] 0.6774193548 0.1652242329 0.0647938168 0.0318658116 0.0179525699
#> [6] 0.0110818333 0.0073067033 0.0050640518 0.0036497670 0.0027147028
#> [11] 0.0020722922 0.0016166818 0.0012847803 0.0010374002 0.0008493335
#> [16] 0.0007038676 0.0005896273 0.0004986897 0.0004254225 0.0003657479
ryules(20, 2.1)
#> [1] 1 1 1 1 2 2 9 1 1 2 1 1 9 1 1 1 11 1 1 1
round(1000 * dyules(1:8, 2))
#> [1] 667 167 67 33 19 12 8 6
table(ryules(1000, 2))
#>
#> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 21 25 40 55 63
#> 666 167 59 31 24 14 11 5 6 2 4 2 2 1 1 1 1 1 1 1
if (FALSE) x <- 0:6
plot(x, dyules(x, shape = 2.2), type = "h", las = 1, col = "blue")
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'x' not found
# \dontrun{}