Please review the "United Nations" method in the smooth_age_5() function. It occasionally returns negative values when using hypothetical data, which should not happen. We should consider adding a warning and further clarification to the help documentation or implementing a fix. Additionally, please verify the adequacy of the provided example.
For instance, the following example (see age 10) shows unexpected behaviour with synthetic data:
Hello,
Please review the "United Nations" method in the smooth_age_5() function. It occasionally returns negative values when using hypothetical data, which should not happen. We should consider adding a warning and further clarification to the help documentation or implementing a fix. Additionally, please verify the adequacy of the provided example.
For instance, the following example (see age 10) shows unexpected behaviour with synthetic data:
deaths <- c(10266, 618, 411, 755, 1098, 1100, 1357, 1335, 3257, 2200, 4023, 2167, 4578, 2956, 4212, 2887, 2351, 1500, 900, 500, 300)
age <- seq(0, 100, 5)
smooth_age_5(Value = deaths, Age = age, method = "United Nations")