Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lt_abridged: Error in if (any(ind)) { : missing value where TRUE/FALSE needed #243

Closed
patrick-gerland opened this issue Jun 23, 2021 · 2 comments

Comments

@patrick-gerland
Copy link

lt_abridged(Deaths, Exposures, Age, AgeInt, radix=1e+05, axmethod="un", Sex="b", region="w", mod=TRUE, OAG=FALSE, OAnew=100)

with this input data
Deaths <- c(4.97558685, 2.25622114, 0.06666667, 0.46666933, 0.80000000, 0.26666667, 1.66666933, 2.33333333, 1.71662582, 1.20000000, 1.60000267, 1.66666667, 2.20000000, 5.93333333, 5.33333333, 4.86480818, 3.44238651, 2.09001738)
Exposures <- c(177.13333, 676.66667, 733.80000, 618.13333, 496.86667, 378.60000, 302.20000, 262.66667, 241.06667, 208.40000, 167.46667, 130.60000, 106.40000, , 86.46667, , 68.60000, , 62.66667, , 53.20000, , 36.60000)
Age <- c(0, , 1, , 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80)
AgeInt <- c(1, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5)

causes an error: Error in if (any(ind)) { : missing value where TRUE/FALSE needed

@peterdavjohnson
Copy link
Contributor

peterdavjohnson commented Jun 23, 2021 via email

@patrick-gerland
Copy link
Author

Thanks Peter - you are right. Actually my problem was elsewhere for a different input series of deaths that had in some age groups negative deaths which of course are numerical artefacts that should not exist, but were created thru some unconstrained interpolations for very small population with very low mortality or no deaths in some age groups..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants