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

graduate_mono doesn't seem to work if ages don't start from 0 #237

Closed
peterdavjohnson opened this issue May 5, 2021 · 2 comments
Closed

Comments

@peterdavjohnson
Copy link
Contributor

The first call works ok, but not the second.

Pop5 <- c(88962, 73756, 51990, 55395, 48562)
Age5 <- seq(0,20,5)

Pop <- graduate_mono(Pop5, Age5 )

Age5alt <- seq(45,65,5)
PopAlt <- graduate_mono(Pop5, Age5alt )
@peterdavjohnson
Copy link
Contributor Author

I think I found the problem which seems to be corrected here (lines 1072-1074):

  AgePred               <- c(min(Age), min(Age) + cumsum(AgeInt)) # modified 5/5/21
  y                     <- c(0, cumsum(Value))
  AgeS                  <- min(Age):(min(Age)+sum(AgeInt)) # modified 5/5/21

@timriffe
Copy link
Owner

timriffe commented May 5, 2021 via email

@timriffe timriffe closed this as completed May 5, 2021
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