Maximum likelihood

Gist

Given the data we have, what parameter best describe what we observe. One way to fit model.

Definition

Here, we have a likelihood function:

L(θ;Y)

Where Theta is the parameter and Y is the given observations. This is also the same as the joint probability of the observations.

Note that we often work with the log likelihood as the product becomes a sum.

Usage

  1. Model fitting - SIR
Be wary of using it for fitting incidence data

When I was fitting RSV, negative binomial penalty was weird because of the variacne

Normal distribution

If you assume that the data is normally distributed (see Normal Distribution, this is like finding the Least squares

Derivation

Given a

What to do with the output?

  1. Multiple parameters gives you a Covariance Matrix

Some advice

  1. Estimate on the unconstrained scale. Lot of the biological rates in the model such as in the SIR is positive. For example, β in the SIR model should be logβ . Back transofrm at the end.
  2. Return a large finite value on failure, not NA: If the ODE solver struggles at some parameter combination, 1e12 tells the optimizer to go the other way