DOI: 10.5061/dryad.866t1g217
title: Data for: Correlated evolution of categorical characters under a simple model

description: I describe a simple model for quantifying the strength of association
 between two categorical characters evolving on a phylogenetic
 tree. The model can be used to estimate a correlation statistic
 that asks whether or not the two characters tend to change at the
 same time (positive correlation) or at different times (no
 correlation). This is different than asking if changes in one
 character are associated with a particular state in
 another character, which has been the focus of most prior tests
 for phylogenetic correlation in categorical characters. Analyses
 of simulated data indicate that positive correlations can be
 accurately estimated over a range of different tree sizes and
 phylogenetic signals.
description: # Data for: Correlated evolution of categorical characters under a simple
 model
 [https://doi.org/10.5061/dryad.866t1g217](https://doi.org/10.5061/dryad.866t1g217) ## Description of the data and file structure Data and codes for fitting and testing the correlated Mk model ### Files and variables #### File: suppmat.tar.gz **Description:** A gzip compressed archive with the following contents: The `data-empirical` directory contains the squamate dental-diet dataset from [10.1038/s41467-021-26285-w](https://doi.org/10.1038/s41467-021-26285-w): * `41467_2021_26285_MOESM4_ESM.txt` Newick string formatted squamate reptile phylogeny for species with dental-diet data. * `41467_2021_26285_MOESM6_ESM.csv` CSV delimited file with dental-diet states for species in the phylogeny. Each row contains the dental-diet state combination for a single species. The file contains the following relevant headers: * `species` Latin binomial of the species * `tooth.complexity` Dental state of the species. One of *1Unicuspid, 2Bicuspid, 3Tricuspid,* or *4Multicuspid* * `diet` Diet state of the species. One of *Insectivorous, Carnivorous, Omnivorous,* or *Herbivorous* - `CITATION` Reference for the squamate phylogeny and dental-diet dataset. The `data-simulated` directory contains the code for generating simulated datasets under the correlated Mk model: * `simulate.R` R script for simulating data under the correlated and independent Mk models * `simulate-results.csv` CSV delimited file with output from `simulate.R`. Each row contains the results of analyzing a single simulation that was generated under the correlated Mk model. The file contains the following headers: * `rx` the true rate of change in character *X* only * `ry` the true rate of change in character *Y* only * `rxy` the true rate of simultaneous change in *X* and *Y* * `corr` the true evolutionary correlation between *X* and *Y* * `rx.hat, ry.hat, rxy.hat, corr.hat` values estimated for the above quantities under the correlated Mk model * `rx0.hat, ry0.hat` values estimated for `rx` and `ry` under the independent Mk model  * `LR` the likelihood ratio statistic comparing the fit of the correlated Mk model to the independent Mk model * `kx, ky` the number of character states in *X* and *Y*, respectively * `tree.index, tree.size` the index and size of the phylogeny used in the simulation, respectively * `simulate-results-uncorrelated.csv` As for above except that the simulations were generated under the independent Mk model. * `squamates_Title_Science2024_ultrametric_constrained.tre` Newick string formatted squamate reptile phylogeny used to generate the simulation phylogenies. * `CITATION` Reference for the squamate phylogeny. The `figs` directory contains the R scripts for generating the figures that appear in the publication. The `mkcor_1.0.tar.gz` archive is the mkcor R package version implementing the correlated Mk model that was used in the publication. The R package is also available from [github.com/blueraleigh/mkcor](https://github.com/blueraleigh/mkcor). The `README` file contains instructions for installing the R package. ## Access information Other publicly accessible locations of the data: * [github.com/blueraleigh/mkcor](https://github.com/blueraleigh/mkcor) for the mkcor R package. Data was derived from the following sources: * [10.1038/s41467-021-26285-w](https://doi.org/10.1038/s41467-021-26285-w) for the squamate dental-diet dataset. * [10.1126/science.adh2449](https://doi.org/10.1126/science.adh2449) for the squamate phylogeny used in the simulations.