perm.ds.grp: Data stream permutation for association data

View source: R/perm.ds.grp.R

perm.ds.grpR Documentation

Data stream permutation for association data

Description

Pre-network permutation on association data for gambit of the group data collection protocol. The data frame must have a column named 'ID'.

Usage

perm.ds.grp(df, scan, ctrlf = NULL, index = "sri", nperm, progress = TRUE)

Arguments

df

A data frame.The data frame must have a column named 'ID'.

scan

an integer indicating the column of scans of individual associations.

ctrlf

A confounding factor by which to control group associations.

index

Which type of index of associations to calculate:

  • 'sri' for Simple ratio index: x \div x+yAB+yA+yB

  • 'hwi' for Half-weight index: x/x+yAB+1/2(yA+yB)

  • 'sqri' for Square root index:x/sqr((x+yAB+yA)(x+yAB+yB))

nperm

number of permutations to perform.

progress

a boolean indicating if the permutation process must be visible.

Details

Data stream permutation is a pre-network permutation approach. It is used on association data based on the gambit of the group.

Value

list of square association index matrices. The first element of the list is the non-permuted association index matrix.

Author(s)

Sebastian Sosa, Ivan Puga-Gonzalez.

References

Whitehead, H. A. L. (1997). Analysing animal social structure. Animal behaviour, 53(5), 1053-1067.

Farine, D. R. (2017). A guide to null models for animal social network analysis. Methods in Ecology and Evolution.

Sosa, S. (2018). Social Network Analysis, in: Encyclopedia of Animal Cognition and Behavior. Springer.

Examples

head(sim.grp)
t=perm.ds.grp(df = sim.grp, scan ='location', ctrlf ='time', nperm = 10, index = 'sri')

SebastianSosa/ANTs documentation built on Sept. 25, 2023, 11:06 p.m.