steepTest: Calculate the Steepness of Davids Score Ranking

Description Usage Arguments Details Value References Examples

Description

Using the methods outlined in de Vries et al 2006, calculates the steepness of a David's Score rating as well as uses simulation in order to estimate a 'p-value' for the probablility of the group being organized in a linear organization (alternate hypothesis).

Usage

1
steepTest(intData, iter = 2000, corrected = FALSE)

Arguments

intData

Object of class int Data from which to derive and test the hierarchy.

iter

The number of simulations to run in order to estimate a p-value.

corrected

Wether to use the corrected method for Davids score.

Details

The steep test creates a test for steepness by simuating possible outcomes between dyads given their set number of interactions. This process is outlined in detail in de Vries et al 2006.

Value

A numeric vector of length two indicating the steepness and the p-value found from simulation for the steepness.

References

de Vries et al (2006). Measuring and testing the steepness of dominance hierarchies. Animal Behaviour.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# generate generic data
interactions <- data.frame (a = sample (letters [1:10], 100, T),
                            b = sample (letters [1:10], 100, T),
                            o = sample (c(-1,-1,0,1,1), 100, T),
                            d = Sys.time () + runif (100, 40, 160))
# convert to interData object
id1 <- intTableConv (interactions)
# calculate David's Score
davidScore (id1)
# calculate steepness and p-value
steepTest (id1)

nmmarquez/linHierarchy documentation built on May 23, 2019, 9:28 p.m.