Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plotting SI with negative values in {episoap} templates #107

Closed
CarmenTamayo opened this issue Dec 5, 2023 · 7 comments
Closed

Plotting SI with negative values in {episoap} templates #107

CarmenTamayo opened this issue Dec 5, 2023 · 7 comments
Assignees

Comments

@CarmenTamayo
Copy link
Contributor

CarmenTamayo commented Dec 5, 2023

On the current transmissibility template, the SI section includes a function to plot the SI distribution, which currently is restricted to positive values only.
While this is the most common case, there are instances where the SI can also take negative values, such as when there's pre-symptomatic transmission and the IP is longer than the SI (see visualisation).
This is the case for the study that comes up by default when using epiparameter_db for COVID-19.

Right now this is specified with si_x <- seq(1L, to = si$prob_dist$qf(0.999), by = 1L)

Should I change this to allow negative values as well?

@Bisaloo
Copy link
Member

Bisaloo commented Dec 5, 2023

Yes, I guess it should then plot from the 0.01 quantile to the 0.999 quantile. How does this sound?

@adamkucharski
Copy link
Member

Is this in the context of estimating R? As serial interval is often used as an easier-to-measure proxy for generation interval (which is always positive), perhaps something to flag to users (so they don't inadvertently make an assumption that cases can infect people in the past!)

@CarmenTamayo
Copy link
Contributor Author

On the issue I was referring to the section of the template where the SI is plotted, I was wondering if we should plot the entire distribution or keep it as it is to keep only the positive values.
However the same object si_x with a vector of values from the distribution is then used in subsequent steps to by EpiNow2 and R0 for the generation time distribution

@CarmenTamayo
Copy link
Contributor Author

To follow up on this issue, the SI distribution (which can have negative values with the normal distribution) is used in the main skeleton of the report for plotting and in the rmd chunks for estimating the generation time.
I suggest that the plot includes all the values of the distribution, from min to max, and that the samples taken from the distribution to estimate GT in the code chunks are restricted to only contain positive values

@Bisaloo
Copy link
Member

Bisaloo commented Jan 8, 2024

That sounds good to me. We just need to make sure this is very explicitly documented.

I may also suggest to wait until #109 (comment) is solved before moving forward on this issue. We may decide to tackle this issue on epiparameter's side.

@CarmenTamayo
Copy link
Contributor Author

@Bisaloo this issue and issue #109 are the only 2 ones left that are kind of blocking merging the PR

@Bisaloo
Copy link
Member

Bisaloo commented Feb 12, 2024

I see this as a separate issue. Let's address it in a follow up PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants