SIR.MH {stochasticGEM}R Documentation

Fit a partially observed Markovian/nonMarkovian SIR general epidemic model

Description

SIR.MH is used to fit the Markovian/nonMarkovian SIR general epidemic model via Markov chain Monte Carlo. In this compartmental model only the removal times are observed.

Usage

SIR.MH(N, infectionTimes = NULL, removalTimes, START = NULL, 
    priorValues = NULL, bayesReps = 10000, burnIn = 0, bayesThin = 1, 
    ARS = TRUE, verbose = FALSE, missingInfectionTimes = TRUE,
    infectious.density = "exponential")

Arguments

N initial susceptible individuals
infectionTimes starting values for the infection times
removalTimes removal times
START A vector with 2 or 3 elements, the infection rate and the removal rate for exponential distributed infectious periods, or the infection rate and the scale and shape parameter of the infectious period respectively for gamma/Weibull distributed infectious periods. Defaults to NULL.
priorValues A list with elements infectionRate and removalRate for an exponential density or infectionRate, infectiousScale and infectiousShape for other densities, being vectors of length 2 containing the gamma prior coefficients for the corresponding parameters. A prior, theta, for the initial infection time is needed for the exponential (a scalar) and gamma (a vector of length 2). Priors are necessary, for instance when using a gamma density the first element of theta should be at least 1.
bayesReps A positive integer denoting the number of MCMC draws. The default is 10000
burnIn A positive integer denoting the burn-in interval for the Markov chain, i.e., the number of initial draws that should not be stored. The default is 0.
bayesThin A positive integer denoting the thinning interval for the Markov chain, i.e., the interval between successive values of the Markov chain. The default is 1.
ARS Use adaptive rejection sampling or slice sampling to update shape parameter(s). Defaults to adaptive rejection sampling.
verbose Used to check activity of MCMC sampler. A dot is printed at every bayesReps/100 iteration.
missingInfectionTimes Are missing values updated or fixed. By default the infection times are updated.
infectious.density type of density. can be either exponential, gamma and weibull

Details

If certain elements of the starting values are missing an attempt is made to get suitable starting values. In this attempt the infectiousShape is assumed to be 1. If 'infection.density' is exponential the remRateSIR is returned instead of infScaleSIR and infShapeSIR.

Value

a list of components containing the folowing elements:

logLikelihood A Markov chain Monte Carlo object of the 'psuedo' log likelihood for each completed data set. The function mcmc in the coda library is used to create the object.
infectionTimes Posterior mean of the infection times.
removalTimes Removal times.
infRateSIR A Markov chain Monte Carlo object of the Gibbs draws for the infection rate. The function mcmc in the coda library is used to create the object.
remRateSIR A Markov chain Monte Carlo object of the Gibbs draws for the removal rate for exponentially distributed infectious periods. The function mcmc in the coda library is used to create the object.
infScaleSIR A Markov chain Monte Carlo object of the Gibbs draws for the scale parameter of the gamma/Weibull distribution. The function mcmc in the coda library is used to create the object.
infShapeSIR A Markov chain Monte Carlo object of the Metropolis-Hastings draws for the shape parameter of the gamma/Weibull distribution. The function mcmc in the coda library is used to create the object.
acceptRate A vector of length 2 with the number of accepted draws for the infection times and the shape parameter of the infectious duration. The first elements corresponds to the infection times and the second to the shape parameter.
bayesReps The number of MCMC draws
burnIn The burn-in interval for the Markov chain.
bayesThin The thinning interval for the Markov chain.
bayesOut Number of saved iterations.
initialSusceptible Initial susceptible individuals.
initialInfective Initial infective individuals.
infectiousPeriod A Markov chain Monte Carlo object of the infectious period. The function mcmc in the coda library is used to create the object.
reproductionNumber A Markov chain Monte Carlo object of the reproduction number. The function mcmc in the coda library is used to create the object.

Author(s)

Eugene Zwane e.zwane@gmail.com

References

O'Neill, P.D. & Roberts, G.O. (1999). 'Bayesian inference for partially observed stochastic epidemics' J.R. Statist. Soc. A. 162, 121-129.

O'Neill, P.D. & Becker, N.G. (2001). 'Inference for an epidemic when susceptibility varies' Biostatistics 2, 99-108.

Streftaris, G. & Gibson, G.J. (2004). 'Bayesian inference for stochastic epidemics in closed populations' Statistical Modelling 4, 63-75.

See Also

fLatentSEIR.MH, SEIR.MH, SIR.MLE

Examples

    data(smallpox)
    priors <- list(infectionRate = c(0.0,0.0), removalRate = c(0.0,0.0), theta = 0) 
    temp <- SIR.MH(N=119,removalTimes=smallpox, priorValues=priors,
        bayesReps=1000,burnIn=500,bayesThin=1,infectious.density = "exponential")
    summary(temp$infRateSIR)
    summary(temp$remRateSIR)
    summary(temp$infectiousPeriod)
    summary(temp$reproductionNumber)
    #
    #
    priors <- list(infectionRate = c(0.0,0.0), 
        infectiousScale = c(0.0,0.0), infectiousShape = c(0.0,0.0),
        theta = c(1,0))
    temp <- SIR.MH(N=119,removalTimes=smallpox, priorValues=priors,
        bayesReps=1000,burnIn=500,bayesThin=1,infectious.density = "gamma")
    summary(temp$infRateSIR)
    summary(temp$infScaleSIR)
    summary(temp$infShapeSIR)
    summary(temp$infectiousPeriod)
    summary(temp$reproductionNumber)
    #
    #
    priors <- list(infectionRate = c(0.0,0.0), 
        infectiousScale = c(0.0,0.0), infectiousShape = c(0.0,0.0))
    temp <- SIR.MH(N=119,removalTimes=smallpox, priorValues=priors,
        bayesReps=1000,burnIn=500,bayesThin=1,infectious.density = "weibull")
    summary(temp$infRateSIR)
    summary(temp$infScaleSIR)
    summary(temp$infShapeSIR)
    summary(temp$infectiousPeriod)
    summary(temp$reproductionNumber)

[Package stochasticGEM version 0.0-1 Index]