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

WIP exp gamma implementation #89

Draft
wants to merge 2 commits into
base: prod
Choose a base branch
from
Draft

Conversation

kaitejohnson
Copy link
Collaborator

Another attempt at #51
This does a rescaling of the number of genomes shed per infection to separate the "relative shedding intensities" of each individual and the mean number of genomes shed per infection $\mu_g$.
Thus the total number of genomes shed in the sewershed is:

$$V(t) = \sum_{t=0}^{\tau}\mu_g \zeta(t-\tau)s(\tau)$$

where $\zeta(t)$ is the sum of iid Gamma distributed individual relative shedding intensities with mean 1 and coefficient of variation $cv$:

$$\zeta(t) = \sum_{i=1}^{i= I(t)} Gamma(\alpha = \frac{1}{cv^2}, \beta = \frac{1}{cv^2}) = Gamma(\alpha = \frac{I(t)}{cv^2}, \beta = \frac{1}{cv^2})$$

Then we implement this by sampling directly in the model block what we refer to in the code as zeta_bar, which returns the log of the output of the gamma draw, and then we log transform the mean number of genomes and the calculation of the expected concentration in the transformed parameters block.

 for (i in 1:n_subpops){
          for (j in 1:(uot + ot + ht)){
            zeta_bar[i,j] ~ expgamma(i_site_t[i,j]/(cv^2), 1/((cv^2))); // Sum of iid gamma individual relative shedding intensities
          }
        }

However, this seems to struggle a lot more to sample parameter space when we set an uninformative prior on the cv.

@kaitejohnson kaitejohnson added help wanted Extra attention is needed model development labels Jun 24, 2024
@kaitejohnson kaitejohnson self-assigned this Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed model development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant