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:
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
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?
- Multiple parameters gives you a Covariance Matrix
Some advice
- 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 . Back transofrm at the end. - 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