-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Inconsistency in timing of dead counts in time-variant model (kin_time_variant_2sex)
There appears to be a mismatch between the timing of mortality rates and the reported dead counts in the time-variant implementation of kin_time_variant_2sex.
Description
Within the main loop, results are stored as:
for (t in 1:n_years_data) {
kin_all[[t + 1]] <- ...
}This produces a list kin_all of length n_years_data + 1. However, names are assigned as:
names(kin_all) <- as.character(years_data)Since years_data has length n_years_data, the final element (kin_all[[n_years_data + 1]]) is left unnamed (NA) and is not selected downstream (e.g. in output_period_cohort_combination).
Consequence
The practical effect is that:
deadreported for year Y reflects mortality rates from year Y−1,- while deaths computed using the rates of the final input year are effectively dropped.
Wanted behaviour
kin_full$dead at time Y should reflect mortality rates at time Y.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels