simulatetsir function

simulatetsir

simulatetsir

This function just simulates the forward prediction given the data and a parms list generated from estpars or mcmcestpars.

simulatetsir( data, nsim = 100, IP = 2, parms, method = "deterministic", epidemics = "cont", pred = "forward", threshold = 1, inits.fit = FALSE, add.noise.sd = 0, mul.noise.sd = 0 )

Arguments

  • data: The data frame containing cases and interpolated births and populations.
  • nsim: The number of simulations to do. Defaults to 100.
  • IP: The infectious period. Defaults to 2.
  • parms: Either the parameters estimated by estpars or mcmcestpars, or a list containing beta, rho, Z, sbar, alpha, X, Y, Yhat, contact, alphalow, alphahigh, loglik, pop vectors.
  • method: The type of next step prediction used. Options are 'negbin' for negative binomial, 'pois' for poisson distribution, and 'deterministic'. Defaults to 'deterministic'.
  • epidemics: The type of data splitting. Options are 'cont' which doesn't split the data up at all, and 'break' which breaks the epidemics up if there are a lot of zeros. Defaults to 'cont'.
  • pred: The type of prediction used. Options are 'forward' and 'step-ahead'. Defaults to 'forward'.
  • threshold: The cut off for a new epidemic if epidemics = 'break'. Defaults to 1.
  • inits.fit: Whether or not to fit initial conditions using simple least squares as well. Defaults to FALSE. This parameter is more necessary in more chaotic locations.
  • add.noise.sd: The sd for additive noise, defaults to zero.
  • mul.noise.sd: The sd for multiplicative noise, defaults to zero.
  • Maintainer: Alexander D. Becker
  • License: GPL-3
  • Last published: 2021-01-20

Useful links