The current code uses dplyr::select to remove the columns from the output dataframe which are not part of the model, because all the observations within such compartments are equal to zero (because they're irrelevant and defaulted to zero in the implementation).
The use of dplyr::select removes the Dead compartment, which is present in the output of an SIR model, however I would expect that the Exposed compartment would also be present and removed by dplyr, but it's not present in the output. This leads me to the question, why is dplyr::select necessary here at all? Why is Dead present in the output at all when the model is SIR, and why isn't Exposed present and also entirely zero? It's not included at all!
Before dplyr::select removes the compartment(s) which are not part of the model.
The issue is inconsequential to the operation of the application, but might lead to some other issue in the future (i.e. following some future change) if not addressed.
The current code uses
dplyr::select
to remove the columns from the output dataframe which are not part of the model, because all the observations within such compartments are equal to zero (because they're irrelevant and defaulted to zero in the implementation).The use of
dplyr::select
removes the Dead compartment, which is present in the output of an SIR model, however I would expect that the Exposed compartment would also be present and removed by dplyr, but it's not present in the output. This leads me to the question, why isdplyr::select
necessary here at all? Why is Dead present in the output at all when the model is SIR, and why isn't Exposed present and also entirely zero? It's not included at all!Before
dplyr::select
removes the compartment(s) which are not part of the model.