reconhub / incidence

☣:chart_with_upwards_trend::chart_with_downwards_trend:☣ Compute and visualise incidence
https://reconhub.github.io/incidence
Other
58 stars 13 forks source link

Allow peak estimation across groups #66

Open zkamvar opened 6 years ago

zkamvar commented 6 years ago

Given that find_peak() can do so without pooling and bootstrapping considers groups, it's not much of a stretch to think that we can bootstrap across groups and find the peak. The only issue is that the current implementation would have to be changed in a non-trivial way to accommodate. We would need to pre-allocate a data frame (not a matrix) of dates (if the input is date), and then we can run a for loop to add the computed bootstraps in with df[i, ] <- as.list(find_peak(boostrap(x), pool = TRUE))