Function to be Optimize
objective_fun(par, x, Dx, Ex, mx, qx, law, opt.method, custom.law)
The optimal value
Vector of ages at the beginning of the age interval.
Object containing death counts. An element of the Dx
object
represents the number of deaths during the year to persons aged x to x+n.
Exposure in the period. Ex
can be approximated by the
mid-year population aged x to x+n.
Life table death rate in age interval [x, x+n).
Probability of dying in age interval [x, x+n).
The name of the mortality law/model to be used. e.g.
gompertz
, makeham
, ... To investigate all the possible options,
see availableLaws
function.
How would you like to find the parameters? Specify the
function to be optimize. Available options: the Poisson likelihood function
poissonL
; the Binomial likelihood function -binomialL
; and
6 other loss functions. For more details, check the availableLF
function.
Allows you to fit a model that is not defined in the package. Accepts as input a function.