Description Usage Arguments Value References Examples
View source: R/draw.logarithmic.R
This function implements pseudo-random number generation for a logarithmic distribution with pmf
f(x|θ) = - \frac{θ^{x}}{x\log(1-θ)}
for x=1,2,3,... and 0 < θ < 1.
1 | draw.logarithmic(nrep,theta)
|
nrep |
Number of data points to generate. |
theta |
Rate parameter of the desired logarithmic distribution. |
A list of length five containing generated data, the theoretical mean, the empirical mean, the theoretical variance, and the empirical variance with names y, theo.mean, emp.mean, theo.var, and emp.var, respectively.
Kemp, A. W. Efficient generation of logarithmically distributed pseudo-random variables. Applied Statistics, 30, 249-253.
1 2 3 | draw.logarithmic(nrep=100000,theta=0.33)
draw.logarithmic(nrep=100000,theta=0.66)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.