Learn R Programming

R0 (version 1.3-1)

fit.epid.optim: Joint estimation of R and generation time distribution for the ML method

Description

An objective function, wrapped around fit.epid(), that will be passed to stats::optim() to jointly estimate the best-fitting R and GT distributions in the context of the Maximum-Likelihood method from est.R0.ML().

Usage

fit.epid.optim(par = c(1, 1, 1), ...)

Value

A Poisson log-likelihood from fit.epid().

Arguments

par

A vector of three numerical values to be optimized, in the order c(log.R, GT$mean, GT$sd).

...

Parameters passed to inner functions.

Author

Pierre-Yves Boelle, Thomas Obadia

Details

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

This is a wrapper function used to pass proper arguments to fit.epid() when the ML method is used to estimate simultaneously R and GT. This function is used as objective to maximize by stats::optim().