Commit 6b355894 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer

deathProbabilities: Use age vector instead of hardcoded ages starting from 0

parent 642e4dd7
......@@ -37,7 +37,7 @@ setMethod("deathProbabilities","mortalityTable.trendProjection",
function (object, ..., YOB = 1975) {
qx=object@deathProbs * (1 + object@loading);
if (is.null(object@trend2) || length(object@trend2) <= 1) {
ages = 0:(length(qx)-1);
ages = object@ages;
damping = sapply(
ages,
function (age) { object@dampingFunction(YOB + age - object@baseYear) }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment