rWL {extrafrail} | R Documentation |
Generated random variables from the weighted Lindley distribution.
Description
Generated random variables from the weighted Lindley distribution with mean 1.
Usage
rWL(n, theta = 1)
Arguments
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
theta |
variance of the variable. |
Details
The weighted Lindley distribution has probability density function
f(z;\theta)=\frac{\theta}{2\Gamma(\theta)}a_{\theta}^{-b_{\theta}-1}z^{b_{\theta}-1}(1+z)\exp\left(-\frac{z}{a_{\theta}}\right), \quad z, \theta>0,
where a_{\theta}=\frac{\theta(\theta+4)}{2(\theta+2)}
and b_{\theta}=\frac{4}{\theta(\theta+4)}
. Under
this parametrization, E(Z)=1 and Var(Z)=\theta
.
Value
a vector of length n with the generated values.
Author(s)
Diego Gallardo and Marcelo Bourguignon.
References
Gallardo, D.I., Bourguignon, M. (2022) The multivariate weighted Lindley frailty model for cluster failure time data. Submitted.
Examples
rWL(10, theta=0.5)