Giter VIP home page Giter VIP logo

dsd's Introduction

DSD

R code for calculating the distributional selection differential (DSD), maximizers (h), and associated functions defined in the paper:

Henshaw JM, Zemel Y (2017). A unified measure of linear and nonlinear selection on quantitative traits. Methods in Ecology and Evolution 8(5): 604-614 (doi:10.1111/2041โ€‘210X.12685)

Requires the R package lpSolve for the calculation of optimal flows.

Contents

functions.R

This file contains the following functions:

Function Description
maximizer calculates the maximizers (h) for a vector/matrix of trait values Z and a vector of fitness values W
DSD calculates the distributional selection differentials (DSD) for a vector/matrix of trait values Z and a vector of fitness values W
DSD.components calculates the DSD along with their directional and non-directional components (dD and dN)
delta calculates the distributional selection gradients (delta) for a vector/matrix of trait values Z and a vector of fitness values W
s calculates the linear selection differentials (s) for a vector/matrix of trait values Z and a vector of fitness values W
beta calculates the linear selection gradients (beta) for a vector/matrix of trait values Z and a vector of fitness values W
analyze.selection calculates DSD, dD, dN, delta, s, and beta for a vector/matrix of trait values Z and a vector of fitness values W
selection.permutation.test calculates p-values for DSD, dD, dN, and s, based on a simple permutation test
minFlowGeneral calculates an optimal flow between two arbitrary trait distributions (p and q) over trait values z
minFlowSelection calculates an optimal flow between the trait distributions before and after selection for a vector of trait values z and a vector of fitness values W
flowDecomposition decomposes any flow over a vector of trait values z into directional and non-directional component flows (D and N)
flowComposition composes a directional flow D and a non-directional flow N

tests.R

This file contains some simulations for trying out the functions in the file functions.R

Copyright (c) 2018 Yoav Zemel and Jonathan M. Henshaw

dsd's People

Contributors

jjono avatar

Watchers

James Cloos 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.