fit.epid: Poisson log-likelihood for an observed epidemic

View source: R/fit.epid.R

fit.epidR Documentation

Poisson log-likelihood for an observed epidemic

Description

Computes the Poisson log-likelihood of an observed epidemic, compared to the expected incidence values for a given R and generation time distirbution.

Usage

fit.epid(log.R, epid, GT, import, pred = FALSE, offset = 0)

Arguments

log.R

The log-reproduction ratio.

epid

An epidemic curve, in the sense of passing check.incid() validations. It must have at least an incidence vector in an incid component.

GT

Generation time distribution from generation.time().

import

Vector of imported cases

pred

Boolean. By default (FALSE), the function returns the corresponding log-likelihood. When set to TRUE, the function will return the Poisson-predicted incidence series instead.

offset

Offset value for the log-likelihood (used to calculate confidence intervals).

Details

For internal use. Called from est.R0.ML().

Computes and returns the Poisson log-likelihood of an observed epidemic, conditional on a given value of R and a generation time distribution.

Value

The Poisson log-likelihood of the observed epidemic passed as argument epid, or the Poisson-predicted incidence series given R and GT values.

Note

This function is also used in fit.epid.optim(), which is a wrapper for the joint optimization routine to determine the best-fitting R and GT values when the est.R0.ML() method is called and asked to jointly estimate reproduction ratios and generation time distirbution.

Author(s)

Pierre-Yves Boelle, Thomas Obadia


tobadia/R0 documentation built on Sept. 24, 2023, 5:16 p.m.