llik_cov: Evaluate the approximate log-likelihood of an underreported...

Description Usage Arguments Value

View source: R/covariates.R

Description

The likelihood approximation is based on an approximation of the process by a second-order equivalent process with complete reporting. Note that this is an R version while a reimplementation in Rcpp is used in the optimization.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
llik_cov(
  Y,
  m1,
  vl1,
  nu,
  phi,
  kappa,
  psi,
  q,
  max_lag = 5,
  return_contributions = FALSE
)

Arguments

Y

a time series of counts (numeric vector)

m1

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

vl1

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

nu, phi, kappa, psi

the time-varying model parameters (vectors of same length)

psi

overdispersion parameter (scalar)

q

the assumed reporting probability

max_lag

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

return_contributions

shall the log-likelihood contributions of each time point be returned (as vector)?

Value

The log-likelihood as scalar or (if return_contributions == TRUE) the vector of log-likelihood contributions.


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