You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
new_record = data.frame(Date = "2020-05-16", Symbol = "beta", Value = 0.1, Type = "abs")
But we need to add it in a very specific and non-intuitive way.
## so that simulation history works
tv_opt = rbind(pars_time_opt(sir_cal_tv), new_record)
sir_cal_tv2 = update_piece_wise(sir_cal_tv, tv_opt)
## so that simulate_ensemble works
tv_spec = rbind(pars_time_spec(sir_cal_tv$model_to_calibrate), new_record)
sir_cal_tv2$model_to_calibrate = update_piece_wise(sir_cal_tv2$model_to_calibrate, tv_spec)
Now we can do the simulations and view the different caused by the new record.
set.seed(1L)
ens = simulate_ensemble(sir_cal_tv)
set.seed(1L)
ens2 = simulate_ensemble(sir_cal_tv2)
sh = simulation_history(sir_cal_tv2)
all.equal(ens, ens2)
## should show the effect of the new record in model 2 only
bind_rows(ens, ens2, .id = "model") |>
filter(var == "I") |> ggplot() + geom_line(aes(Date, value, colour = model))
## should be similar, but to noise
plot(filter(ens2, var == "I")$value, sh$I)
abline(a = 0, b = 1)
The text was updated successfully, but these errors were encountered:
Here is how to do it properly, but it really is confusing.
We use examples from the user guide.
Now that we are set up, we can add this record.
But we need to add it in a very specific and non-intuitive way.
Now we can do the simulations and view the different caused by the new record.
The text was updated successfully, but these errors were encountered: