  Effective population size characterizes the genetic variability in a
population and is a parameter of paramount importance in population genetics.
Kingman's coalescent process enables inference of past population dynamics
directly from molecular sequence data, and researchers have developed a number
of flexible coalescent-based models for Bayesian nonparametric estimation of
the effective population size as a function of time. A major goal of
demographic reconstruction is understanding the association between the
effective population size and potential explanatory factors. Building upon
Bayesian nonparametric coalescent-based approaches, we introduce a flexible
framework that incorporates time-varying covariates through Gaussian Markov
random fields. To approximate the posterior distribution, we adapt efficient
Markov chain Monte Carlo algorithms designed for highly structured Gaussian
models. Incorporating covariates into the demographic inference framework
enables the modeling of associations between the effective population size and
covariates while accounting for uncertainty in population histories.
Furthermore, it can lead to more precise estimates of population dynamics. We
apply our model to four examples. We reconstruct the demographic history of
raccoon rabies in North America and find a significant association with the
spatiotemporal spread of the outbreak. Next, we examine the effective
population size trajectory of the DENV-4 virus in Puerto Rico along with viral
isolate count data and find similar cyclic patterns. We compare the population
history of the HIV-1 CRF02_AG clade in Cameroon with HIV incidence and
prevalence data and find that the effective population size is more reflective
of incidence rate. Finally, we explore the hypothesis that the population
dynamics of musk ox during the Late Quaternary period were related to climate
change.
