perm.ds.focal {ANTs}R Documentation

Data stream permutation for focal sampling data .

Description

Warning, the original function (Farine 2017) uses a control factor, the number of focals and the ids of the focals.

Usage

perm.ds.focal(
  df,
  focal,
  ctrl = NULL,
  alters,
  nperm,
  progress = T,
  index = "sri"
)

Arguments

df

a data frame.

focal

an integer indicating the column of the focal.

ctrl

a numeric vector indicating the control factors.

alters

an integer indicating the column of focal's alters.

nperm

an integer indicating the number of permutations.

progress

a boolean indicating if the permutation process must be visible.

index

a string indicating the association index to compute:

  • 'sri' for Simple ratio index: x/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))

Details

Pre-network permutation for focal sampling data, and for symmetric behaviour only.

References

Farine, D. R. (2017). A guide to null models for animal social network analysis. Methods in ecology and evolution, 8(10), 1309-1320.

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

Examples

head(sim.focal.undirected)
t=perm.ds.focal(sim.focal.undirected,focal=3,ctrl=1,alters=4,nperm=10,progress=TRUE,index='sri')

[Package ANTs version 0.0.16 Index]