simulate_hhh4u_covariate: Simulate from underreported model with one covariate

Description Usage Arguments Value Examples

View source: R/covariates.R

Description

Simulate from an endemic-epidemic model with a covariate entering into the endemic component. Requires specification of the initial value for $lambda$.

Usage

1
simulate_hhh4u_covariate(lambda1, alpha_nu, beta_nu, phi, kappa, psi, q = 1, z)

Arguments

lambda1

the initial mean

alpha_nu, beta_nu, phi, kappa, psi

the parameters of the latent model

q

the reporting probability

z

a covariate entering into the endemic parameter $nu$

Value

A named list with elements "X" and "Y" containing the unthinned and thinned simulated time series.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# define a covariate:
z <- sin(2*pi*1:200/20)
# define the model parameters:
lambda1 <- 10
alpha_nu <- 3
beta_nu <- 1
phi <- 0.5
kappa <- 0.2
psi <- 0.1
q <- 0.5
sim <- generate_ar_cov(lambda1 = lambda1,
                       alpha_nu = alpha_nu,
                       beta_nu = beta_nu,
                       phi = phi,
                       kappa = kappa,
                       psi = psi,
                       q = q,
                       z = z)

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