This page contains a Mathematica notebook and input files for the book chapter "Modeling the distribution of distance data in Euclidean space" by Ruth Davidson, Joseph Rusinko, Zoe Vernon, and Jing Xi.

Data input files are given as Excel spreadsheets. As described in the paper, distance data input files were computed from data matrices downloaded from using MEGA version 5 [2]. The file DaucusJC.xls was computed from a data matrix associated to the paper [1]. At the time we published this chapter, we could no longer find the study [1] on, so we include our Excel sheet we made from the data matrix here.

To test the Mathematica notebook, download the notebook and DaucusJC.xls files to your computer, update the input path in the first line of the notebook to the location of DaucusJC.xls in your computer, and hit ``Evaluate Notebook" under the Evaluation tab at the top of the Mathematica user screen.

Mathematica Notebook


This notebook will perform a model comparison on any distance data matrix-with some caveats. Our model assumptions is that all distances are nonnegative, as described in the paper. Furthermore, Mathematica fails to converge to the correct parameters for some data matrices, in particular for the Gamma distribution. This can sometimes be fixed by adjusting the starting point for the parameter estimation by hand, but this introduces another variable into the model selection besides the default settings of Mathematica, so we did not include any data in the paper obtained after we had to assist Mathematica by providing different starting points for parameter estimation.

The notebook is designed to take as input a distance data matrix output by MEGA, so includes commands at the beginning to drop taxon names and properly convert the MEGA output file into a matrix of numbers. If your distance data matrix is not MEGA output format, you will need to change the commands at the beginning. Please direct all questions and issues about the software and input files to

[1] Spooner, D., Rojas, P., Bonierbale, M., Mueller, L., Srivastav, M., Senalik, D., and Simon, P. 2013. Molecular phylogeny of daucus. Systematic Botany, 38: 850–857.

[2] Tamura, K., Peterson, D., Peterson, N., Stecher, G., Nei, M., and Kumar, S. 2011. Mega5: Molecular evolutionary genetics analysis using maximum likelihood, evolutionary distance, and maximum parsimony methods. Molecular Biology and Evolution, 28: 2731–2739.