dc_test: Randomization Test of DC and Skew-Symmetry of a Sociomatrix.

Description Usage Arguments Value References Further details Examples

View source: R/dc_test.R

Description

Randomization Test of DC and Skew-Symmetry of a Sociomatrix.

Usage

1
dc_test(m, N = 20, ntimes = 10000)

Arguments

m

A matrix with individuals ordered identically in rows and columns.

N

The number of behaviors for each dyad

ntimes

Number of simulations

Value

A list containing p-value of each test, observed values and descriptive measures of randomized data.

References

Leiva D et al, 2008, Testing reciprocity in social interactions: A comparison between the directional consistency and skew-symmetry statistics, Behav Res Methods.

Further details

This is a one-sided significance test i.e. that observed values are higher than expected

Examples

1
2
3
4
5
6
7
8
m <- matrix(c(NA,2,30,6,19,122,0,NA,18,
0,19,85,0,1,NA,3,8,84,0,0,0,NA,267,50,0,
0,0,5,NA,10,1,0,4,4,1,NA), ncol=6)  #table 2, Vervaecke et al. 2000  - fleeing in bonobos
dc_test(m)

mm = matrix(c(0,9,3,6,12,18,13,0,7,17,45,6,7,2,0,5,8,0,11,26,
12,0,8,6,4,3,0,1,0,2,2,5,0,1,0,0),6,6,TRUE)
dc_test(mm,N=16)

compete documentation built on May 29, 2017, 1:39 p.m.