mpascariu / ungroup

Estimating Smooth Distributions from Coarsely Binned Data - R Package
Other
13 stars 9 forks source link

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

Open StaffanBetner opened 4 years ago

StaffanBetner commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

This issue is related #4 as well.