nllik_seas: Evaluate the approximate negative log-likelihood of a...

Description Usage Arguments Value

View source: R/seasonal.R

Description

The likelihood approximation is based on an approximation of the process by a second-order equivalent process with complete reporting.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
nllik_seas(
  observed,
  alpha_nu,
  gamma_nu,
  delta_nu,
  alpha_phi,
  gamma_phi = 0,
  delta_phi = 0,
  alpha_kappa,
  psi,
  q,
  L,
  max_lag = 5,
  return_contributions = FALSE
)

Arguments

observed

a time series of counts (numeric vector)

alpha_nu, gamma_nu, delta_nu

the endemic model parameters (scalar)

alpha_phi, gamma_phi, delta_phi, alpha_kappa

the autoregressive model parameters (scalars)

psi

overdispersion parameter (scalar)

q

the assumed reporting probability

L

the period length (integer; e.g. 52 for weekly data and yearly seasonality)

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 negative log-likelihood as scalar or (if return_contributions == TRUE) the vector of negative log-likelihood contributions.


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