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;θ)=θ2Γ(θ)aθbθ1zbθ1(1+z)exp(zaθ),z,θ>0, 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θ=θ(θ+4)2(θ+2)a_{\theta}=\frac{\theta(\theta+4)}{2(\theta+2)} and bθ=4θ(θ+4)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)

[Package extrafrail version 1.10 Index]