SDS.MCMC: SDS Likelihood MCMc

Description Usage Arguments Value

View source: R/SdsMCMC.R

Description

This function generates posterior samples of beta, gamma, and rho using MCMC based on SDS likelihood in subsection 4.2 This function includes an additional step for generating the initial number of susceptible n. using NegativeBinomial This function uses RAM method via adapt_S() function from ramcmc R-package

Usage

1
2
3
4
5
6
7
8
9
SDS.MCMC(
  data,
  Tmax,
  fitn = T,
  nrepeat = 1000,
  prior.a,
  prior.b,
  ic = c(k1, k2, k3, k4)
)

Arguments

data

input data set, must be a form of Sellke epidemic (two columns. first is infection time, second is recovery time)

Tmax

cutoff time of epidemic

fitn

if T the function estimate initial number of susceptible, if F the function does not estimate N and calculate from data, so inputted data must cover a total population

nrepeat

number of iteration of MCMC

prior.a

hyper shape parameter of gamma prior for beta, gamma, rho, hyper parameter lambda

prior.b

hyper rate parameter of gamma prior for beta, gamma, rho, hyper parameter lambda

ic

initial value of beta, gamma, rho and N

Value

returning posterior samples of beta, gamma, rho (with fitn=F) or beta, gamma, rho, and n (with fitn=T)


2019020826/SDSMCMC documentation built on March 2, 2020, 5:31 a.m.