sampling.uncertainty {ANTs} R Documentation

## Metric uncertainty

### Description

Perform a matrix boostrapping approach to estimate the confidence intervals surrounding each pairwise association.

### Usage

sampling.uncertainty(
df,
nboot,
metric = "met.strength",
assoc.indices = FALSE,
actor = NULL,
scan = NULL,
id = NULL,
index = "sri",
progress = TRUE,
...
)


### Arguments

 df a data frame of individual interactions or associations nboot an integer indicating the number of bootstrap wanted. metric the network metric to compute assoc.indices a bolean indicating if association indices must be used actor If argument assoc.indices is FALSE, fill this argument, an integer or a string indicating the column of the individuals performing the behaviour. receiver If argument assoc.indices is FALSE, fill this argument, an integer or a string indicating the column of the individuals receiving the behaviour. scan If argument assoc.indices is TRUE, fill this argument, a numeric or character vector representing one or more columns used as scan factors. id If argument assoc.indices is TRUE, fill this argument, a numeric or character vector indicating the column holding ids of individuals. index a string indicating the association index to compute. progress a boolean indicating if function should print progress. ... additional argument related to the computation of the metric declared. '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

This process evaluates network metrics uncertainty by performing a boostrap with replacement on the data frame of associations and recomputing the network metric of interest.

### Value

3 elements:

• A matrix in which each column represents a node metric variation through bootstrapping, with the first row representing the original metric.

• A summary of bootstrap distribution for each node.

• A plot of metric variations through bootstrap

Sebastian Sosa

### References

Lusseau, D., Whitehead, H., & Gero, S. (2009). Incorporating uncertainty into the study of animal social networks. arXiv preprint arXiv:0903.1519.

### Examples

test <- sampling.uncertainty(df = sim.focal.directed, nboot = 100,
metric = "met.strength")

# objects returned by the function
test$metrics test$summary
test\$plot

# Example with metric extra arguments
sampling.uncertainty(df = sim.focal.directed, nboot = 100,