RodrigoZepeda / diseasenowcasting

Package for nowcasting the number of cases of an infectious disease when test results are lagged
https://rodrigozepeda.github.io/diseasenowcasting/
Other
2 stars 0 forks source link

Create a summary #14

Closed RodrigoZepeda closed 1 month ago

RodrigoZepeda commented 2 months ago

For the rstan object

RodrigoZepeda commented 2 months ago

So the summary function would be something like this:

library(diseasenowcasting)

data(denguedat)

# Change to more iterations
predictions <- nowcast(denguedat, "onset_week", "report_week",
                       now = as.Date("1990-10-01"),
                       dist = "NegativeBinomial", cores = 4, iter = 1000)

summary <- function(predictions, quantiles = c(0.025, 0.975)){

  #1) Summarize the predictions (rstan object)
  data_predict <- function(predictions, quantiles)

  #2) Join the predicted to the real data
  data_predict |> left_join(real_data)

}
RodrigoZepeda commented 2 months ago

We are first doing #19 before this one here

MatteoPS commented 1 month ago

done with summary_nowcast() #45