perm.dataStream.group: Data stream permutation for association data

View source: R/perm.dataStream.group.R

perm.dataStream.groupR Documentation

Data stream permutation for association data

Description

Pre-network permutation on association data

Usage

perm.dataStream.group(
  df,
  scan,
  control_factor = NULL,
  nperm,
  progress = TRUE,
  method = "sri"
)

Arguments

df

A data frame.The data frame must have a column named 'ID'. ID have to be set as factors!

scan

an integer indicating the column of scans of individuals association.

control_factor

A confounding factor by which to control group associations.

progress

a boolean indicating if the permutation process has to be visible.

method

Which type of index to calculate:

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

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

  • 'tw' for Twice-weigh index:x/x+2yAB+yA+yB

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

perm

number of permutations to perform.

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.


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