x <- 0:100
mx <- 0.001 * exp(x * 0.07)
sn <- sen_num(mx,age=x,sex='t',closeout=TRUE)
sa <- sen_arriaga_instantaneous2(mx, age=x,sex='t',perturb = 1e-4)
# \donttest{
plot(x,sa)
lines(x,sn)
# }
# examine residuals:
sn - sa
# Note discrepancies in ages >0 are due to numerical precision only
# \donttest{
plot(x, sn - sa, main = "still uncertain what accounts for the age 0 discrepancy")
# }
Run the code above in your browser using DataLab