perm.double.grp {ANTs}R 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.double.grp(
  obs,
  scan,
  ctrlf = NULL,
  nperm,
  progress = TRUE,
  index = "sri",
  measure,
  test = "median",
  df = NULL,
  dfid = NULL,
  rf,
  ...
)

Arguments

obs

a data frame of gambit of the group observations. The data frame must have a column named 'ID'.

scan

an integer indicating the column of scans of individual associations in obs.

ctrlf

A confounding factor by which to control group associationsin obs.

nperm

number of permutations to perform.

progress

a boolean indicating if the permutation process must be visible.

index

Which type of index of associations 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)

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

measure

a character indicating the social network measure to compute (Only those available in ANTs)

test

a character indicating the test to realize to account for the social network measure

df

a data frame of individual characteristics in which store permutations.

dfid

an integer or a string indicating the column with individual ids in argument df.

rf

an integer (column id) or a string (column name) indicating the column holding the factor grouping multiple networks in argument df.

...

Additional arguments related to the social network measure to compute (argument measure).

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.double.grp(sim.grp, 'location', 'time', 10, measure = "met.strength")

[Package ANTs version 0.0.16 Index]