Usage
GompertzMakeham(A, B, C, t) fitGM(initialpar=c(0.01, 0.0003, 0.07), data, mode=1, Method="Nelder-Mead", ...)
Arguments
A
The parameter A of the Gompertz-Makeham model u(t)=A*expB*t+C.
B
The parameter B of the Gompertz-Makeham model u(t)=A*expB*t+C.
C
The parameter C of the Gompertz-Makeham model u(t)=A*expB*t+C.
t
Age (vector OK) in years
initialpar
Initial value for the parameters to be estimated. If not given, c(0.01, 0.0003, 0.07) is used.
data
Actual vector of qx in the lifetable to be used to obtain the best-fit parameters of the Gompertz-Makeham model.
mode
Which of lifetable functions should be used to calculate the RMSE, which is to be minimized in optim() function: 1 qx, 2 dx, otherwise lx. Default is 1.
Method
The method to be used in optim() function. Default is "Nelder-Mead".
...
Other options to be passed to optim().