Skip to contents

Fits a function that returns mortality rate based on an inverse Gompertz survival function

Usage

fit_gompertz(delta, beta)

Arguments

delta

shape of mortality curve

beta

rate of decline

Value

function that accepts x and returns y based on fitted model

Details

A mortality rate function to pass on to the Endosymbiont model. Fits an a Gomeprtz survival function to calculate mortality rate: $$ 1 - e^{\left(\frac{\delta}{\beta}\left(1 - e^{\beta \cdot \text{{age}}}\right)\right)} $$

References

Gompertz, B., On the nature of the function expressive of the law of human mortality and on a new mode of determining the value of life contingencies. Philosophical Transactions of the Royal Society of London, 115, 513-583 (1825)

Examples

my_func <- EndoSim:::fit_gompertz(0.00188, 0.13)
plot(seq(0, 50, by = 0.1), my_func(seq(0, 50, by = 0.1)), type = "l")