Inference by simulation
Imagine a model you can simulate but cannot score. Run it and out comes a dataset. Ask how probable your dataset was under it, and there is no formula to evaluate.
Reporting delays, weekend effects, behaviour that responds to the epidemic: each is simple to simulate, and together they have no density you can write.
The likelihood is still there. The simulator is — you simply cannot evaluate it.
Draw from the prior. Simulate a dataset. Keep if the simulation came out exactly equal to the data.
Nothing has been approximated. The you keep are draws from .
For continuous data exact equality has probability zero. For our 59 counts it is possible, but so unlikely that we would wait effectively forever. Two concessions, and this is where the approximate comes from.
Close, not equal. Keep when the distance between simulation and data comes in under a tolerance .
Summaries, not the whole dataset. Over 59 days even “close” almost never happens, so compare summary statistics instead.
How many. All of them must land inside at once, so acceptance falls off fast as you add more. Three or four is usual.
Whether they move with . One that barely responds shrinks the acceptance region and tells you nothing.
What scale they are on. Weight each by its spread under the prior predictive, or the largest one drowns out the rest.
A summary is sufficient if it tells you everything the data say about . Then is .
For a model like ours there is no such summary short of the whole dataset.
| removed by | |
|---|---|
| the threshold | letting |
| the summary | nothing |
Too tight and you reject almost everything. The acceptance rate collapses and you wait forever for a handful of samples.
Too loose and you accept almost everything, including parameters that fit badly. In the limit you are sampling the prior.
There is no free lunch here: trades accuracy against compute, and you cannot tell from inside the algorithm whether you have chosen well.
The simplest version, and the one you will write:
Repeat until you have enough samples. The kept parameters approximate the posterior.
No likelihood anywhere. Just a simulator, a distance, and a threshold.
Rejection ABC draws every parameter from the prior, however hopeless. ABC-SMC walks the threshold down in stages instead.
Each generation starts from parameters already known to be reasonable, so a tight threshold becomes reachable.
The catch: particles need weighting to stay unbiased, which is the same propagate-weight-resample structure as the particle filter.
In the practical you will
Approximate Bayesian computation