Giter Site home page Giter Site logo

compete's Introduction

compete

Analyzing head-to-head competitive interaction data


Author: James P. Curley,

Contributions: Jiayi Fu, Ke Shen & Ziheng Huang

Maintainer: James P. Curley

email: curley AT utexas DOT edu


Installation
devtools::install_github('jalapic/compete')
Citation

Even though this package is in development, if you do use it in published research please cite it as:

Curley, J.P. 2016, compete: Analyzing Social Hierarchies: R package version 0.1


Functions

  • get_wl_matrix - turns edgelist into Win-Loss Sociomatrix

  • get_di_matrix - turns Win-Loss Sociomatrix into Binary Win-Loss Sociomatrix

  • org_matrix - organize Sociomatrix

  • dci - Directional Consistency of Sociomatrix

  • phi - Phi Skew-Symmetry Coefficient of Sociomatrix

  • dc_test - Randomization Test of Directional Consistency and Phi Skew-Symmetry

  • devries - Modified Landau's h' of Sociomatrix and randomization test

  • ttri - Triangle Transitivity of Sociomatrix

  • ttri_test - Randomization Test of Triangle Transitivity of Sociomatrix

  • isi98 - I&SI ranking of Sociomatrix (see documentation)

  • isi13 - I&SI ranking of Sociomatrix using updated algorithm (see documentation)

  • ds - get David's Scores of Sociomatrix

  • rshps - get summary info of all relationships in matrix

  • unknonws - number of unknowns in matrix

  • sparseness - get sparseness of matrix


Published papers

Please let me know if you use this package in your papers. Unfortunately I don't have time to compile a complete list of papers using it, but if you let me know I'll add here.

This package was used in the following papers:


Arseneau-RobarabAnouk JM, 2017, Intra- and interindividual differences in the costs and benefits of intergroup aggression in female vervet monkeys, Animal Behaviour 123: 129-137, https://www.sciencedirect.com/science/article/pii/S0003347216302858.

Pineda-Galindo E, Cedra-Molina AL, Mayagoitia-Novales L, Matamoros-Trejo G, de la O C, 2017, Biological Validataions of Fecal Glucocorticoid, Testosterone, and Progesterone Metabolite Measurements in Captive Stumptail Macaques (Macaca arctoides), Int J Primatol DOIL 10.1007/s10764-017-9992-7

Tong X et al, 2020, Reestablishment of Social Hierarchies in Weaned Pigs after Mixing, Animals 2020, 10(1), 36; https://doi.org/10.3390/ani10010036

van Overveld T et al, 2018, Food predictability and social status drive individual resource specializations in a territorial vulture, Scientific Reports 8: 15155 https://www.nature.com/articles/s41598-018-33564-y

van Overveld T et al, 2020, Seasonal grouping dynamics in a territorial vulture: ecological drivers and social consequences, Behavioral Ecology and Sociobiology volume 74: 28 https://link.springer.com/article/10.1007/s00265-020-2807-4

Ebenau A et al 2019, Personality homophily affects male social bonding in wild Assamese macaques, Macaca assamensis, Animal Behaviour 155:21-35 https://www.sciencedirect.com/science/article/pii/S0003347219302052

Mishra PS et al. 2020, Do males bond? A study of male-male relationships in Nicobar long-tailed macaques Macaca fascicularis umbrosus, Journal of Biosciences 45:22. https://link.springer.com/article/10.1007/s12038-020-9995-y

Diniz P et al 2019, Angry caciques: intrasexual aggression in a Neotropical colonial blackbird, Ethology, Ecology & Evolution 31:205-218.



Some preprints (as of Feb 2020):

Vilette C. et al., Ranking the Ranking Methodologies: Determining Temporal Stability in Dominance Hierarchies, https://www.biorxiv.org/content/10.1101/692384v1.abstract

Karamihalev S. et al., Sexually divergent effects of social dominance on chronic stress outcomes in mice, https://www.biorxiv.org/content/10.1101/2020.02.04.933481v1



Some papers from my lab also:

See publication list of Curley Lab here for some examples.

So, N. et al. 2015, A Social Network Approach Reveals Associations between Mouse Social Dominance and Brain Gene Expression, PLOS ONE

Curley JP, 2016, Temporal Pairwise-Correlation Analysis Provides Empirical Support for Attention Hierarchies in Mice, Biology Letters

Williamson C, Lee W & Curley JP, 2016, Temporal Dynamics of Social Hierarchy Formation and Maintenance in Male Mice., Animal Behaviour.

Williamson CM, Franks B & Curley JP, 2016, Mouse Social Network Dynamics and Community Structure are Associated with Brain Plasticity-Related Gene Expression, Frontiers in Behavioral Neuroscience 10:152.

Williamson CM, Romeo RD & Curley JP, 2017, Dynamic changes in social dominance and mPOA GnRH expression in male mice following social opportunity, Hormones & Behavior 87:80-88.

Williamson CM, Lee W, Romeo RD & Curley JP, 2017, Social context-dependent relationships between mouse dominance rank and plasma hormone levels. Physiology & Behavior.

Lee W, Hiura L, Yang E, Broekman KA, Ophir AG, Curley J. 2019. Social status in mouse social hierarchies is associated with variation in oxytocin and vasopressin 1a receptor densities. Hormones and Behavior.

Williamson CM, Lee W, Decasien AR, Lanham A, Romeo RD, Curley JP. Social hierarchy position in female mice is associated with plasma corticosterone levels and hypothalamic gene expression. Sci Reports. 2019 Jan 1:529131.



compete's People

Contributors

jalapic avatar kayshen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

compete's Issues

get_wl_matrix

if input dataframe is generated by e.g. dplyr syntax, it doesn't not identify as only data.frame. Need to use as.data.frame(df) prior to running function.

check matrix

Include check matrix step at beginning of algorithms to ensure matrix is all numeric.

author field

These have DESCRIPTION 'Author' fields which contain calls to person()
or as.person(), and hence should be renamed to 'Authors@R' fields (from
which R CMD build will then auto-generated the Author fields).

get_wldf and get_wl_matrix bug

If the third column does not contain "L" then a bug can arise where the functions cannot rbind separate dataframes created from subsetting the data. - need to fix.

type = wlbinomties

"Error in mtxbinom(m) : could not find function "mtxbinom""

I forgot to add this function in the package :(

rownames/colnames

isi98 doesn't work if rownames don't exist. Need to add colnames to rownames,

get_wl_df function

For the function: get_wl_df
At line 34 and 35 – it makes two new data frames: one for id1 winners (a1) and one for id2 winners (a2) so winners are always in the 1st column and losers in the 2nd column.
At line 36 – it adds a new column to both of these new data frames called “result” to give all id1 values 1 — winners.

However, if there are no id2 winners then the code for assigning a new column to the id2 data frame (a2) does not work.

`ds` docs

In the ds function, should say 'type` for all instances of using D/P methods. It says use 'method' in one instance.

Problem installing compete (R 3.6.1)

I'm unable to install compete because of the following problem:

Warning in install.packages :
  package ‘compete’ is not available (for R version 3.6.1)

Is this a known issue?

isi13() fails for n=4 individuals

domatrix
3 4 5 9
3 0 1 1 7
4 0 0 0 0
5 1 0 0 0
9 0 0 0 0

isi13(domatrix)

Error in if (result[i] == result[i + 1]) { :
missing value where TRUE/FALSE needed

isi98(domatrix)

INITIAL RANK:
[1] "3" "5" "4" "9"
I = 0
SI = 0
$best_matrix
3 5 4 9
3 0 1 1 7
5 1 0 0 0
4 0 0 0 0
9 0 0 0 0

$best_order
[1] "3" "5" "4" "9"

$I
[1] 0

$SI
[1] 0

$rs
[1] 1

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.