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

Allow for missing years (and interpolate) in two-dimensional smooth #6

Open
StaffanBetner opened this issue Sep 10, 2019 · 2 comments

Comments

@StaffanBetner
Copy link

My case is that I have population data for most part of the period every third year, but I have mortality data each year (but that might be missing as well for other regions). It should in theory be possible to interpolate over the years with missing data. The only thing I have come up with is this ad hoc solution:

Say I have population data at time point 1 and 3, and mortality data for 1, 2 and 3. Then the estimated population in time point 2 would be some kind of mean of pop_hat_t1 - mortality_hat_t1 (and then shift x axis) and pop_hat_t3+mortality_hat_t3 (hat is for estimated). And possibly iterate back and forward to minimize the difference. But it would be cumbersome when it would be possible to just smooth instead (albeit with some information borrowing from the future in case of new-borns/edge cases)

@mpascariu
Copy link
Owner

Hi @StaffanBetner,
I agree, this would be a good new feature in the package. Feel free to submit a pull request if you have worked on it already and we would me more than happy to accept it. Thanks.

@mpascariu
Copy link
Owner

This issue is related #4 as well.

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

No branches or pull requests

2 participants