simulate_hhh4u: Simulate from underreported model with time-varying...

Description Usage Arguments Value Examples

View source: R/general.R

Description

Simulate from a time-homogeneous endemic-epidemic model with underreporting. Can also be used through the wrapper simulate_hhh4u.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
simulate_hhh4u(
  lambda1,
  nu,
  phi,
  kappa,
  psi,
  q = 1,
  decoarsen = FALSE,
  lgt = max(sapply(list(nu, phi, kappa, psi, q), length)),
  return_sts = TRUE,
  args_sts = list()
)

Arguments

lambda1

the initial value of lambda

nu, phi, kappa, psi

the model parameters (vectors of equal length corresponding to the length of the time series; scalars are recycled).

q

the reporting probability; either a scalar or a vector of length lgt

lgt

= leng

Value

A named list with elements "X", "X_tilde" and "lambda" containing the unthinned and thinned simulated time series as well as the conditional mean process.

Examples

1
sim <- simulate_hhh4u(lambda1 = 1, nu = c(1:5, 4:1), phi = 0.4, kappa = 0.2, psi = 0.1, q = 0.5)

jbracher/hhh4underreporting documentation built on July 21, 2020, 2:08 p.m.