Function to be Optimize
objective_fun(par, x, Dx, Ex, mx, qx, law, opt.method, custom.law)
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.
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 fitted. 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
other 6 loss functions. For more details, check availableLF
function.
Allows you to fit a model that is not defined in the package. Accepts as input a function.