  We consider genealogies arising from a Markov population process in which
individuals are categorized into a discrete collection of compartments, with
the requirement that individuals within the same compartment are statistically
exchangeable. When equipped with a sampling process, each such population
process induces a time-evolving tree-valued process defined as the genealogy of
all sampled individuals. We provide a construction of this genealogy process
and derive exact expressions for the likelihood of an observed genealogy in
terms of filter equations. These filter equations can be numerically solved
using standard Monte Carlo integration methods. Thus, we obtain statistically
efficient likelihood-based inference for essentially arbitrary compartment
models based on an observed genealogy of individuals sampled from the
population.
