Skip to contents

This function constructs the probability density function of the discrete frailty model of a continuous random variable \(T\) through a base density.

Usage

pdf_fragility_zmpg(pdf)

Arguments

pdf

The base probability density function.

Value

Calculates the improper density of a random variable \(T\) that follows the forward discrete frailty model \(f\).

Details

The probability density function of a random variable \(T\) requires the base survival function and hazard function, i.e., \(S_0(t)\) and \(h_0(t)\), respectively. However, it will only be necessary to inform the base density function as an argument for pdf. Internally, the function pdf_fragility_zmpg() will calculate \(S_0(t)\) and \(h_0(t)\). The probability density function of \(T\) is said to be the discrete frailty model. \(T\) is a continuous random variable, where the density (frailty model) was obtained through a discrete random variable \(Z\) that follows a Zero-Modified Generalized Poisson - ZMPG distribution, with \(Z \sim ZMPG(\mu, \phi, \rho)\). The probability density function of the frailty model is given by:

\( f_T(t) = -\frac{\rho h_0(t) e^{-\frac{1}{\phi}\left[W\left(-\frac{\mu\phi}{1 + \mu\phi}S_0(t) e^{-\frac{\mu\phi}{1 + \mu\phi}}\right) + \frac{\mu\phi}{1 + \mu\phi}\right]}}{\phi}\frac{W\left(-\frac{\mu\phi}{1 + \mu\phi}S_0(t)e^{-\frac{\mu\phi}{1 + \mu\phi}}\right)}{1 + W\left(-\frac{\mu\phi}{1 + \mu\phi}S_0(t)e^{-\frac{\mu\phi}{1 + \mu\phi}}\right)},\)

with \(t>0\), \(\mu>0\), \(\phi \geq 0\) and \(\rho \geq 0\).

See also

Examples

zmpg_weibull <- pdf_fragility_zmpg(pdf = dweibull)
zmpg_weibull(t = 1, mu = 1, phi = 1, rho = 0.5, shape = 0.5, scale = 1.2)
#> [1] 0.0259236
#> attr(,"time")
#> [1] 1
#> attr(,"class")
#> [1] "pdf_fragility_zmpg"