perm.double.focal.single {ANTs}R Documentation

Double permutation approach for focal sampling

Description

Double permutation approach for focal sampling

Usage

perm.double.focal.single(
  obs,
  ego,
  alters,
  focal,
  nperm,
  progress = TRUE,
  index = "sri",
  measure,
  test = "median",
  df = NULL,
  dfid = NULL,
  ...
)

Arguments

obs

a data frame of focal observations.

ego

an integer indicating the column of the focal id for the obs.

alters

an integer indicating the column of focal's alters in obs.

focal

a numeric vector indicating the focal number in obs.

nperm

an integer indicating the number of permutations to performed.

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.

...

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

Details

Output need to be incorporated in a data frame and node label permutations with ANTs function perm.net.nl need to be performed before using any ANTs functions "stat.".

Value

A numeric vector of individuals social measure corrected by double permutation approch (node label permutation can the be perfomed on this output)

References

Farine, D. R., & Carter, G. G. (2022). Permutation tests for hypothesis testing with animal social network data: Problems and potential solutions. Methods in Ecology and Evolution, 13, 144- 156. https://doi.org/10.1111/2041-210X.13741


[Package ANTs version 0.0.16 Index]