  The transmission rate of many acute infectious diseases varies significantly
in time, but the underlying mechanisms are usually uncertain. They may include
seasonal changes in the environment, contact rate, immune system response, etc.
The transmission rate has been thought difficult to measure directly. We
present a new algorithm to compute the time-dependent transmission rate
directly from prevalence data, which makes no assumptions about the number of
susceptibles or vital rates. The algorithm follows our complete and explicit
solution of a mathematical inverse problem for SIR-type transmission models. We
prove that almost any infection profile can be perfectly fitted by an SIR model
with variable transmission rate. This clearly shows a serious danger of
over-fitting such transmission models. We illustrate the algorithm with
historic UK measles data and our observations support the common belief that
measles transmission was predominantly driven by school contacts.
