eval.edgeperturbation: Compute the Effects of Single-Edge Perturbations on...

View source: R/models.R

eval.edgeperturbationR Documentation

Compute the Effects of Single-Edge Perturbations on Structural Indices

Description

Evaluates a given function on an input graph with and without a specified edge, returning the difference between the results in each case.

Usage

eval.edgeperturbation(dat, i, j, FUN, ...)

Arguments

dat

A single adjacency matrix

i

The row(s) of the edge(s) to be perturbed

j

The column(s) of the edge(s) to be perturbed

FUN

The function to be computed

...

Additional arguments to FUN

Details

Although primarily a back-end utility for pstar, eval.edgeperturbation may be useful in any circumstance in which one wishes to assess the stability of a given structural index with respect to single edge perturbations. The function to be evaluated is calculated first on the input graph with all marked edges set to present, and then on the same graph with said edges absent. (Obviously, this is sensible only for dichotomous data.) The difference is then returned.

In pstar, calls to eval.edgeperturbation are used to construct a perturbation effect matrix for the GLM.

Value

The difference in the values of FUN as computed on the perturbed graphs.

Note

length(i) and length(j) must be equal; where multiple edges are specified, the row and column listings are interpreted as pairs.

Author(s)

Carter T. Butts buttsc@uci.edu

References

Anderson, C.; Wasserman, S.; and Crouch, B. (1999). “A p* Primer: Logit Models for Social Networks. Social Networks, 21,37-66.

See Also

pstar

Examples


#Create a random graph
g<-rgraph(5)

#How much does a one-edge change affect reciprocity?
eval.edgeperturbation(g,1,2,grecip)

sna documentation built on June 1, 2022, 9:06 a.m.