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

Do inference on generated data #54

Conversation

SamuelBrand1
Copy link
Collaborator

@SamuelBrand1 SamuelBrand1 commented Feb 20, 2024

This PR demonstrates adding Bayesian inference to a combined EpiModel, latent process and observation process together for a toy model.

Specific options

  • EpiModel is DirectInfections; that is the latent process is aimed at generating the log-infections directly (as opposed to $r_t$ or $\mathcal{R}_t$.
  • The latent process is random_walk; that is the latent process is a random walk with unknown step size variance.
  • The observation process is delay_observations; that is the infections are delayed by a delay kernel and then cases are observed using negative binomial sampling.

Minor additional fixes

  • latent_process_priors is renamed to process_priors. This contains the prior distributions of all processes rather than just the latent generative process; this is the simplest in code (see Improve the prior interface for make_epi_model_inference  #45 ), but might be changed soon.
  • Tweaked random_walk to engage type stability.
  • Fixed Direct_Infections so that it started at the inferred init value.

Closes #43

SamuelBrand1 and others added 3 commits February 20, 2024 11:21
…-in-conjunction-with-the-already-existing-rw-latent-process
…liant-output

New function `spread_draws` for creating `tidybayes` compliant MCMC output
@seabbs seabbs enabled auto-merge February 21, 2024 10:58
EpiAware/src/epimodel.jl Outdated Show resolved Hide resolved
Copy link
Collaborator

@seabbs seabbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Copy link
Collaborator

@seabbs seabbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(once above conversations are resolved this will auto-merge)

Copy link
Collaborator

@seabbs seabbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(once above conversations are resolved this will auto-merge)

@seabbs seabbs merged commit f0f603b into main Feb 21, 2024
2 checks passed
@seabbs seabbs deleted the 43-do-inference-on-generated-data-using-this-in-conjunction-with-the-already-existing-rw-latent-process branch February 21, 2024 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants