run_DAMCMC: Run the DA-MCMC

View source: R/run_DAMCMC.R

run_DAMCMCR Documentation

Run the DA-MCMC

Description

Data-augmentation Markov chain Monte Carlo to fit the stochastic SIR model to discretely observed incidence counts with the PD-SIR algorithm.

Usage

run_DAMCMC(
  Y,
  N = 10000,
  rho = 1,
  param = "bg",
  approx = "ldp",
  iota_dist = "exponential",
  gener = FALSE,
  b = 1/2,
  thin = 1,
  theta_0,
  print_i = FALSE,
  save_SS = FALSE,
  par_prior = list(a_beta = 0.01, b_beta = 1, a_gamma = 1, b_gamma = 1, a_R0 = 2, b_R0 =
    2, a_lambda = 1, b_lambda = 1)
)

Arguments

Y

observed data

N

number of iterations of the Markov chain

rho

proportion of the latent data updated each iteration

param

c("bg", "bR"); parameterize the models in terms of (beta, gamma) or (beta, R0)

approx

c("poisson", "ldp"); whether to approximate the distribution of the infection times with a poisson process or a linear death process

iota_dist

c("exponential", "weibull"); distribution of the infection period

gener

logical; whether to use the generalized SIR of Severo (1972)

b

parameter of the generalized SIR

thin

thinning parameter for the Markov chain

theta_0

initial value for the parameters

print_i

logical; whether to print the iteration

save_SS

logical; whether to save the sufficient statistics generated each iteration

par_prior

named list; parameters of the prior distributions

Value

list with the draws for the parameters, the log likelihood, acceptance rate and size of initial susceptible population


rmorsomme/PDSIR documentation built on April 27, 2023, 2:56 p.m.