GithubHelp home page GithubHelp logo

juvelas / es-sim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mgharvey/es-sim

0.0 0.0 0.0 313.09 MB

A simple, simulation-based test for links between diversification rates and continuous traits.

License: Other

R 100.00%

es-sim's Introduction

INTRODUCTION

Code used for testing trait-dependent diversification using tip rate correlation (TRC).

LICENSE

The code within this repository is available under a 3-clause BSD license. See the License.txt file for more information.

CITATION

If you use this pipeline for your own research, please cite:

  • Harvey, MG and Rabosky, DL. 2018. Continuous traits and speciation rates: Alternatives to state-dependent diversification models. Methods in Ecology and Evolution 9: 984-993. (link)

You can also provide a link to this repository if desired:

https://github.com/mgharvey/ES-sim

USAGE

Code used for simulating and analyzing the data in Harvey and Rabosky (in press) are included in the directory ./R/ and the simulated datasets examined are in the directory ./data/.

Requirements:

For now, simply download essim.R from the ./R/ directory of this repository, then load it in R:

source("essim.R")

Run it using the command

essim(phy, trait, nsim = 1000)

where "phy" is your phylogeny, "trait" is a vector containing your trait information (with names that match the names on the tips of your phylogeny), and "nsim" is the number of simulations used to build the null distribution of trait-speciation associations for significance testing. There are also optional arguments "return.es", which if "True" returns a named list of log inverse equal splits values, and "es", which can be used to supply an existing named vector of inverse equal splits values. The test assumptions are the same as for fitting a Brownian motion model to phylogenetic comparative data - that your data fit a multivariate normal distribution with the trait covariance between tips determined by the amount of time they have shared a common ancestor. The test will return the Pearson's correlation coefficient (rho), the simulation-based two-tailed p-value, and optionally the named list of log inverse equal splits statistic values for all tips.

DOI

DOI

es-sim's People

Contributors

josephwb avatar mgharvey avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.