-
Notifications
You must be signed in to change notification settings - Fork 7
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
Full package review for {bpmodels} CRAN release #79
Conversation
Growing a vector in R tends to be slow. This process will run faster due to the pre-allocation: ```r Unit: relative expr min lq mean median uq max neval cld { slow <- c() for (i in seq(1e+06)) slow[i] <- 1 } 5.156572 5.071423 5.084367 5.023986 5.271332 3.261024 100 b { fast <- integer(1e+06) for (i in seq(1e+06)) fast[i] <- 1 } 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 100 a ```
pre-allocate dist
Not sure I understand how your second statement relates to the first. |
That's a good point. I'll crosscheck that. |
I am not sure that this is a necessary feature as we do not want to restrict the user on what types of serial intervals to simulate. There's a case for users wanting to simulate negative serial intervals to pursue questions about the infector being infectious before developing symptoms (See the "serial interval" section of this paper that for example mentions that observed serial intervals can be negative, and [this one](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7239082/#:~:text=Negative%20serial%20intervals%20(left%20of,asymptomatic%20or%20mildly%20symptomatic%20cases) that observed negative serial intervals, and other examples in the literature. @sbfnk Thoughts on this requested feature? |
There is an analytical solution for the negative binomial size distribution. This code chunk demos the simulated binomial size result. |
It's a good point -
I agree - supporting negative SIs is a feature not a bug. |
All issues raised through this full package review have been addressed and logged as GitHub issues, so I am closing this PR now. |
This is a full package review in preparation for submitting {bpmodels} to CRAN. It would be helpful to provide comments that help resolve the checklist provided here #80.
Modalities
How to become a full reviewer
Self-assignment under the "Reviewers" tab on the right side of this window.
Required number of reviewers
Maximum of 2. PS: Don't self-assign when this is reached.
Full reviewers
Deadline
Not currently set.
What next?