simulate_hhh4u2: 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. Wrapper around simulate_hhh4u0 which takes vector-valued parameters.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
simulate_hhh4u2(
  lambda1,
  beta_nu,
  beta_phi,
  kappa,
  psi,
  q = 1,
  lgt,
  z_nu = matrix(rep(1, lgt)),
  z_phi = matrix(rep(1, lgt))
)

Arguments

lambda1

the initial value of lambda

beta_nu

parameters for the linear form entering into log(nu)

beta_phi

parameters for the linear form entering into log(phi)

kappa, psi

Time-constant model parameters

q

the reporting probability

z_nu

Matrix containing the covariates entering into log(nu) (in columns)

z_phi

Matrix containing the covariates entering into log(phi) (in columns)

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
2
3
4
beta_nu <- c(1, 0.005)
z_nu <- cbind(1, 1:100)
sim <- simulate_hhh4u2(lambda1 = 1, beta_nu = beta_nu, beta_phi = -0.6,
kappa = 0.2, psi = 0.1, q = 0.5, z_nu = z_nu)

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