# EpiEstim package and discr_si function

#### Jil

##### New Member
Hello everyone. I am working with the EpiEstim package (on R) in order to estimate "Rt" with incidence data. However, in the package documentation (https://cran.r-project.org/web/packages/EpiEstim/EpiEstim.pdf) there is a point that I can't properly understand. The function "discr_si" (which computes the discrete distribution of the serial interval) assumes that the serial interval is shifted Gamma distributed, with shift 1. However, the input parameters are the following: k (positive integer, or vector of positive ingerers for which the discrete distribution is desired); mu (a positive real giving the mean of the Gamma distribution); sigma (a non-negative real giving the standard deviation of the Gamma distribution). My question is: should I consider mu as already shifted or should I consider mu without shift? I have a value for non shifted mu equal to 6.66 and I don't know whether use 6.66 or 7.66 (mu of shifted gamma with shift 1). In the source code (https://rdrr.io/cran/EpiEstim/src/R/discr_si.R) the Gamma parameters are computed as: a <- ((mu - 1) / sigma)^2 b <- sigma^2 / (mu - 1) so I think that it is possible that I have to use as input parameter "mu+1" (7.66).. but why asking for a shifted distribution when the code shift it back? Am I missing something? Thank you in advance for your help.

#### GretaGarbo

##### Human
Maybe you can just generate a large number of random data and estimate it and by that figure out which it should be. There are many packages that can generate and estimated data. gamlss is one of them.

#### hlsmith

##### Less is more. Stay pure. Stay poor.
Interesting, it would be interesting if you shared what you were working on. I fit a bunch of SIR models in March and April for fun and to provide to some c-suite folks. I remember looking into SEIR but data was terse and looking into probabilistic models, but did not really have time to execute them. With more COVID data available on recoveries and asymptomatic periods - better (more compartmentalized) model can probably now be fit. When time-varying occurred, isolation, I just fit a new model at that point and amended my curves and let the counterfactuals be displayed as well. Let me know if you want to share any code / strategies. Though, I will note I am fairly buried in work right now - so my participation would be in good faith.

Last edited: