AMAndrew F. Magee

Andrew F. Magee

*This is an algorithmically generated author record based on publicly available information.

Current Organizations / Institutes

The organizations/institutes from the scholar's latest article

Previous Organizations / Institutes

The organizations / institutes from the scholar's other articles in the past ten years


Andrew F. Magee has a total of 57 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • Open Access

    Retrospective evaluation of variant forecasting models

    by Thanasi Bakis, Andrew Magee, Scott Olesen

    Variant forecasting is potentially useful for predicting waves of infection and for informing medical countermeasure distribution. To avoid confusion, variant forecasters should distinguish between (1) genomic sequences, which are the data, (2) the taxa (e.g., evolutionary clades or lineages) to which sequences are assigned, and (3) the modeled units formed by aggregating taxa as motivated by real-life epidemiology and practical modeling constraints. Ensembling may be ineffective for variant forecasting because there are few extant classes of variant forecasting models. Rather than rely on a diversity of model types, modelers should consider post hoc model comparison to interrogate and improve the small number of extant models. Most variant forecasting models treat the compositional prevalence of pathogen variants, not the per capita pathogen infection prevalence. This separation is acceptable for the moment but substantially reduces the utility of the resulting forecasts by decoupling variant dynamics from waves of infection. Variant forecasts are typically used to answer decision-oriented questions, like whether a variant will become dominant, while extant scoring metrics focus on a forecast’s ability to make precise estimates day-by-day. Thus, there is a potential disconnect between the performance of models vis-a-vis traditional forecasting scores and their performance in answering the questions that variant forecasts are most often used for.

  • Open Access

    Estimating vaccine-prevented disease outcomes when vaccination has only direct effects

    by Fuhan Yang, Andrew Magee, Sinead E. Morris, Sarabeth M. Mathis, Ryan Wiegand, Danielle Iuliano, Matthew Biggerstaff, Scott W. Olesen

    Vaccination can be a useful intervention for reducing infectious disease burden. Estimating numbers of vaccine-prevented health outcomes is one approach to quantifying the benefits of vaccination. Here we improve a method described by Foppa et al. (1) that assumes vaccination has only direct effects, that is, it cannot prevent infection or onward transmission of the disease. We rederive this method and derive an improved method that increases estimation accuracy with minimal additional analytical complexity. To evaluate the improved method, we simulated disease outbreaks and compared the accuracy of the two methods for estimating prevented disease outcomes. In 84% of simulations performed over a wide parameter space, the improved method had an equal or smaller estimation error compared to the original Foppa method, with 7.9-fold smaller mean error and 44-fold smaller standard deviation of errors. Our study improves a method for estimating prevented burden when assuming vaccination has only direct effects.

  • Open Access

    Random-Effects Substitution Models for Phylogenetics via Scalable Gradient Approximations

    by Andrew F Magee, Andrew J Holbrook, Jonathan E Pekar, Itzue W Caviedes-Solis, Fredrick A Matsen Iv, Guy Baele, Joel O Wertheim, Xiang Ji, Philippe Lemey, Marc A Suchard

    Phylogenetic and discrete-trait evolutionary inference depend heavily on an appropriate characterization of the underlying character substitution process. In this paper, we present random-effects substitution models that extend common continuous-time Markov chain models into a richer class of processes capable of capturing a wider variety of substitution dynamics. As these random-effects substitution models often require many more parameters than their usual counterparts, inference can be both statistically and computationally challenging. Thus, we also propose an efficient approach to compute an approximation to the gradient of the data likelihood with respect to all unknown substitution model parameters. We demonstrate that this approximate gradient enables scaling of sampling-based inference, namely Bayesian inference via Hamiltonian Monte Carlo, under random-effects substitution models across large trees and state-spaces. Applied to a dataset of 583 SARS-CoV-2 sequences, an HKY model with random-effects shows strong signals of nonreversibility in the substitution process, and posterior predictive model checks clearly show that it is a more adequate model than a reversible model. When analyzing the pattern of phylogeographic spread of 1441 influenza A virus (H3N2) sequences between 14 regions, a random-effects phylogeographic substitution model infers that air travel volume adequately predicts almost all dispersal rates. A random-effects state-dependent substitution model reveals no evidence for an effect of arboreality on the swimming mode in the tree frog subfamily Hylinae. Simulations reveal that random-effects substitution models can accommodate both negligible and radical departures from the underlying base substitution model. We show that our gradient-based inference approach is over an order of magnitude more time efficient than conventional approaches.


  • Open Access

    On the surprising effectiveness of a simple matrix exponential derivative approximation, with application to global SARS-CoV-2

    by Gustavo Didier, Nathan E. Glatt-Holtz, Andrew J. Holbrook, Andrew F. Magee, Marc A. Suchard

    The continuous-time Markov chain (CTMC) is the mathematical workhorse of evolutionary biology. Learning CTMC model parameters using modern, gradient-based methods requires the derivative of the matrix exponential evaluated at the CTMC’s infinitesimal generator (rate) matrix. Motivated by the derivative’s extreme computational complexity as a function of state space cardinality, recent work demonstrates the surprising effectiveness of a naive, first-order approximation for a host of problems in computational biology. In response to this empirical success, we obtain rigorous deterministic and probabilistic bounds for the error accrued by the naive approximation and establish a “blessing of dimensionality” result that is universal for a large class of rate matrices with random entries. Finally, we apply the first-order approximation within surrogate-trajectory Hamiltonian Monte Carlo for the analysis of the early spread of Severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) across 44 geographic regions that comprise a state space of unprecedented dimensionality for unstructured (flexible) CTMC models within evolutionary biology.


  • Open Access

    Rapidly changing speciation and extinction rates can be inferred in spite of nonidentifiability

    by Bjørn T. Kopperud, Andrew F. Magee, Sebastian Höhna

    The birth–death model is commonly used to infer speciation and extinction rates by fitting the model to phylogenetic trees with exclusively extant taxa. Recently, it was demonstrated that speciation and extinction rates are not identifiable if the rates are allowed to vary freely over time. The group of birth–death models that have the same likelihood is called a congruence class, and there is no statistical evidence to favor one model over the other. This issue has led researchers to question if and what patterns can reliably be inferred from phylogenies of only extant taxa and whether time-variable birth–death models should be fitted at all. We explore the congruence class in the context of several empirical phylogenies as well as hypothetical scenarios. For these empirical phylogenies, we assume that we inferred the true congruence class. Thus, our conclusions apply to any empirical phylogeny for which we robustly inferred the true congruence class. When we summarize shared patterns in the congruence class, we show that strong directional trends in speciation and extinction rates are shared among most models. Therefore, we conclude that the inference of strong directional trends is robust. Conversely, estimates of constant rates or gentle slopes are not robust and must be treated with caution. Interestingly, the space of valid speciation rates is narrower and more limited in contrast to extinction rates, which are less constrained. These results provide further evidence and insights that speciation rates can be estimated more reliably than extinction rates.


  • Open Access

    CRABS: Congruent rate analyses in birth–death scenarios

    by Sebastian Höhna, Bjørn T. Kopperud, Andrew F. Magee

    Diversification rates inferred from phylogenies are not identifiable if the rates are allowed to vary freely over time. There are infinitely many combinations of speciation and extinction rate functions that have the exact same likelihood score for a given phylogeny, building a congruence class. The specific shape and characteristics of such congruence classes have not yet been studied. Whether speciation and extinction rate functions within a congruence class share common features is also not known. Prior hypotheses typically render diversification rates identifiable, but the results then depend on these a priori hypotheses and assumptions. To test the robustness of diversification results to these a priori hypotheses, we use two different approaches to explore congruence classes: (i) constructing congruent models under alternative hypotheses and (ii) sampling alternative rate function within the congruence class. Our methods are implemented in the open‐source R package CRABS (https://github.com/afmagee/CRABS). CRABS provides a flexible approach to explore the congruence class and provides summaries of rate functions within a congruence class. The summaries can highlight common trends, that is, increasing, flat or decreasing rates. Although there are infinitely many equally likely diversification rate functions, these can share common features. CRABS can be used to assess if diversification rate patterns are robust despite the non‐identifiability of the birth–death model. In our example, we clearly identify three phases of diversification rate changes that are common among all models which we sampled from the congruence class. Thus, congruence classes are not necessarily a problem for studying historical patterns of biodiversity from phylogenies.


  • Top Cited Papers
    Open Access

    The molecular epidemiology of multiple zoonotic origins of SARS-CoV-2

    by Jonathan E. Pekar, Andrew Magee, Edyth Parker, Niema Moshiri, Katherine Izhikevich, Jennifer L. Havens, Karthik Gangavarapu, Lorena Mariana Malpica Serrano, Alexander Crits-Christoph, Nathaniel L. Matteson, et al.

    Understanding the circumstances that lead to pandemics is important for their prevention. We analyzed the genomic diversity of severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) early in the coronavirus disease 2019 (COVID-19) pandemic. We show that SARS-CoV-2 genomic diversity before February 2020 likely comprised only two distinct viral lineages, denoted “A” and “B.” Phylodynamic rooting methods, coupled with epidemic simulations, reveal that these lineages were most probably the result of at least two separate cross-species transmission events into humans. The first zoonotic transmission likely involved lineage B viruses around 18 November 2019 (23 October to 8 December), and the separate introduction of lineage A likely occurred within weeks of this event. These findings indicate that it is unlikely that SARS-CoV-2 circulated widely in humans before November 2019 and define the narrow window between when SARS-CoV-2 first jumped into humans and when the first cases of COVID-19 were reported. As with other coronaviruses, SARS-CoV-2 emergence likely resulted from multiple zoonotic events.


  • Open Access

    ACDC: Analysis of Congruent Diversification Classes

    by Sebastian Hoehna, Bjoern Tore Kopperud, Andrew F. Magee

    Summary: 1. Diversification rates inferred from phylogenies are not identifiable. There are infinitely many combinations of speciation and extinction rate functions that have the exact same likelihood score for a given phylogeny, building a congruence class. The specific shape and characteristics of such congruence classes have not yet been studied. Whether speciation and extinction rate functions within a congruence class share common features is also not known. 2. Instead of striving to make the diversification rates identifiable, we can embrace their inherent non-identifiable nature. We use two different approaches to explore a congruence class: (i) testing of specific alternative hypotheses, and (ii) randomly sampling alternative rate function within the congruence class. 3. Our methods are implemented in the open-source R package ACDC ( https://github.com/afmagee/ACDC ). ACDC provides a flexible approach to explore the congruence class and provides summaries of rate functions within a congruence class. The summaries can highlight common trends, i.e. increasing, flat or decreasing rates. Although there are infinitely many equally likely diversification rate functions, these can share common features. ACDC can be used to assess if diversification rate patterns are robust despite non-identifiability. In our example, we clearly identify three phases of diversification rate changes that are common among all models in the congruence class. Thus, congruence classes are not necessarily a problem for studying historical patterns of biodiversity from phylogenies.


  • Open Access

    Robustness of Phylogenetic Inference to Model Misspecification Caused by Pairwise Epistasis

    by Andrew F Magee, Sarah K Hilton, William S DeWitt

    Likelihood-based phylogenetic inference posits a probabilistic model of character state change along branches of a phylogenetic tree. These models typically assume statistical independence of sites in the sequence alignment. This is a restrictive assumption that facilitates computational tractability, but ignores how epistasis, the effect of genetic background on mutational effects, influences the evolution of functional sequences. We consider the effect of using a misspecified site-independent model on the accuracy of Bayesian phylogenetic inference in the setting of pairwise-site epistasis. Previous work has shown that as alignment length increases, tree reconstruction accuracy also increases. Here, we present a simulation study demonstrating that accuracy increases with alignment size even if the additional sites are epistatically coupled. We introduce an alignment-based test statistic that is a diagnostic for pairwise epistasis and can be used in posterior predictive checks.


  • Open Access

    Impact of K-Pg Mass Extinction Event on Crocodylomorpha Inferred from Phylogeny of Extinct and Extant Taxa

    by Andrew F. Magee, Sebastian Höhna

    Crocodilians and their allies have survived several mass extinction events. However, the impact of the K-Pg mass extinction event on crocodylomorphs is considered as minor or non-existent although other clades of archosaurs, e.g., non-avian dinosaurs and pterosaurs, went extinct completely. Previous approaches using fossil occurrence data alone have proven inconclusive. In this paper, we take a phylogenetic approach using extant and extinct species. The time-calibrated phylogeny of extant crocodilians provides insights into the pattern of recent biodiversity changes whereas fossil occurrence data provide insights about the more ancient past. The two data sources combined into a single phylogeny with extinct and extant taxa provide a holistic view of the historical biodiversity. To utilize this combined data and to infer the impact of the K-Pg mass extinction event, we derive the likelihood function for a time-varying (episodic) serially sampled birth-death model that additionally incorporates mass extinctions and bursts of births. We implemented the likelihood function in a Bayesian framework with recently developed smoothing priors to accommodate for both abrupt and gradual changes in speciation, extinction and fossilization rates. Contrary to previous research, we find strong evidence for the K-Pg extinction event in crocodiles and their allies. This signal is robust to uncertainty in the phylogeny and the prior on the mass extinctions. Through simulated data analyses, we show that there is high power to detect this mass extinction and little risk of false positives.