fit_hhh4u_covariate: Fit an endemic-epidemic model with underreporting and one...

Description Usage Arguments Value

View source: R/covariates.R

Description

Fits an endemic-epidemic model with underreporting and one covariate in the endemic component using an approximative maximum likelihood scheme. The likelihood approximation is based on an approximation of the process by a second-order equivalent process with complete reporting. The reporting probability cannot be estimated from the data (in most cases these contain no information on it) and thus needs to be specified in advance.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
fit_hhh4u_covariate(
  Y,
  q,
  m1,
  vl1,
  covariate,
  initial = c(alpha_nu = 4, beta_nu = 0, alpha_phi = -1, alpha_kappa = -1, log_psi =
    -3),
  max_lag = 10,
  iter_optim = 3,
  ...
)

Arguments

Y

a time series of counts (numeric vector)

q

the assumed reporting probability

m1

the initial mean, i.e. $E(lambda_1)$

vl1

the initial variance of lambda, i.e. $Var(lambda_1)$

covariate

the values of the covariate entering into the endemic component (numeric vector)

initial

the initial value of the parameter vector passed to optim (note: the function tries different starting values in any case)

max_lag

in evaluation of likelihood only lags up to max_lag are taken into account

Value

the return object from optim providing the maximum likelihood estimates (mostly on the log scale).


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