lolog-terms {lolog}R Documentation

LOLOG Model Terms

Description

LOLOG Model Terms

Statistic Descriptions

edges (dyad-independent) (order-independent) (directed) (undirected)

Edges: This term adds one network statistic equal to the number of edges (i.e. nonzero values) in the network.

star(k, direction="in") (order-independent) (directed) (undirected)

The k argument is a vector of distinct integers. This term adds one network statistic to the model for each element in k. The ith such statistic counts the number of distinct k[i]-stars in the network, where a k-star is defined to be a node N and a set of k different nodes \{O_1, \dots, O_k\} such that the ties \{N, O_i\} exist for i=1, \dots, k. For directed networks, direction indicates whether the count is of in-stars (direction="in") or out-stars (direction="out")

triangles() (order-independent) (directed) (undirected)

This term adds one statistic to the model equal to the number of triangles in the network. For an undirected network, a triangle is defined to be any set \{(i,j), (j,k), (k,i)\} of three edges. For a directed network, a triangle is defined as any set of three edges (i{\rightarrow}j) and (j{\rightarrow}k) and either (k{\rightarrow}i) or (k{\leftarrow}i).

clustering() (order-independent) (undirected)

The global clustering coefficient, defined as the number of triangles over the number of possible triangles https://en.wikipedia.org/wiki/Clustering_coefficient, or 3 * triangles / 2-stars.

transitivity() (order-independent) (undirected)

The Soffer-Vazquez transitivity. This is clustering metric that adjusts for large degree differences and is described by C in Equation 6 of #' https://pubmed.ncbi.nlm.nih.gov/16089694/. Note The approximation of the number of possible shared neighbors between node i and j of min(d_i,d_j) - 1 in this implementation.

mutual() (order-independent) (directed)

A count of the number of pairs of actors i and j for which (i{\rightarrow}j) and (j{\rightarrow}i) both exist.

nodeMatch(name) (dyad-independent) (order-independent) (directed) (undirected)

For categorical network nodal variable 'name,' the number of edges between nodes with the same variable value.

nodeMix(name) (dyad-independent) (order-independent) (directed) (undirected)

For categorical network nodal variable 'name,' adds one statistic for each combination of levels of the variable equal to the count of edges between those levels.

degree(d, direction="undirected", lessThanOrEqual=FALSE) (order-independent) (directed) (undirected)

The d argument is a vector of distinct integers. This term adds one network statistic to the model for each element in d; the ith such statistic equals the number of nodes in the network of degree d[i], i.e. with exactly d[i] edges. For directed networks if direction="undirected" degree is counted as the sum of the in and out degrees of a node. If direction="in" then in-degrees are used and direction="out" indicates out-degrees.

If lessThanOrEqual=TRUE, then the count is the number of nodes with degree less than or equal to d.

twoPath (order-independent) (directed) (undirected)

This term adds one statistic to the model, equal to the number of 2-paths in the network. For a directed network this is defined as a pair of edges (i{\rightarrow}j), (j{\rightarrow}k), where i and j must be distinct. That is, it is a directed path of length 2 from i to k via j. For directed networks a 2-path is also a mixed 2-star. For undirected networks a twopath is defined as a pair of edges \{i,j\}, \{j,k\}. That is, it is an undirected path of length 2 from i to k via j, also known as a 2-star.

degreeCrossProd() (order-independent) (undirected)

This term adds one network statistic equal to the mean of the cross-products of the degrees of all pairs of nodes in the network which are tied.

nodeCov(name) (dyad-independent) (order-independent) (directed) (undirected)

The name argument is a character string giving the name of a numeric attribute in the network's vertex attribute list. This term adds a single network statistic to the model equaling the sum of name(i) and name(j) for all edges (i,j) in the network. For categorical variables, levels are coded as 1,..,nlevels'.

edgeCov(x, name=NULL) (dyad-independent) (order-independent) (directed) (undirected)

The x argument is a square matrix of covariates, one for each possible edge in the network. This term adds one statistic to the model, equal to the sum of the covariate values for each edge appearing in the network. The edgeCov term applies to both directed and undirected networks. For undirected networks the covariates are also assumed to be undirected. If present, the name argument is a character string providing a name for the edgeCov term. The name will be "edgeCov.<name>". It is recommended that all edgeCov terms be given explicit names. In particular, if two unnamed edgeCov terms are supplied an error will occur (as they will have the same default name "edgeCov.".

edgeCovSparse(x, name=NULL) (dyad-independent) (order-independent) (directed) (undirected)

Identical to edgeCov, except x should be a sparse matrix. This is especially useful for larger networks, where passing a dense matrix to edgeCov is too memory intensive.

gwesp(alpha) (order-independent) (directed) (undirected)

This term is just like gwdsp except it adds a statistic equal to the geometrically weighted edgewise (not dyadwise) shared partner distribution with decay parameter alpha parameter, which should be non-negative.

gwdegree(alpha, direction="undirected") (order-independent) (directed) (undirected)

This term adds one network statistic to the model equal to the weighted degree distribution with decay controlled by the decay parameter. The alpha parameter is the same as theta_s in equation (14) in Hunter (2007).

For directed networks if direction="undirected" degree is counted as the sum of the in and out degrees of a node. If direction="in" then in-degrees are used ans direction="out" indicates out-degrees.

gwdsp(alpha) (order-independent) (directed) (undirected)

This term adds one network statistic to the model equal to the geometrically weighted dyadwise shared partner distribution with decay parameter decay parameter, which should be non-negative.

esp(d, type=2) (order-independent) (directed) (undirected)

This term adds one network statistic to the model for each element in d where the ith such statistic equals the number of edges (rather than dyads) in the network with exactly d[i] shared partners. This term can be used with directed and undirected networks. For directed networks the count depends on type:

type = 1 : from -> to -> nbr -> from

type = 2 : from -> to <- nbr <- from (homogeneous)

type = 3 : either type 1 or 2

type = 4 : all combinations of from -> to <-> nbr <-> from

geoDist(long, lat, distCuts=Inf) (dyad-independent) (order-independent) (undirected)

given nodal variables for longitude and latitude, calculates the sum of the great circle distance between connected nodes. distCuts splits this into separate statistics that count the sum of the minimum of the cut point and the distance.

dist(names (dyad-independent) (order-independent) (undirected)

Calculates a statistic equal to the sum of the euclidean distances between connected nodes on the numeric nodal variables specified in names.

preferentialAttachment(k=1, direction="in") (directed) (undirected)

An order dependent preferential attachment term. For each edge, adds

log( (k+degree) / (n * (meanDegree + k)))

where degree is the current degree of the acting node, n is the network size, and meanDegree is the mean degree of the network. This depends upon the order in which edges are added. For directed networks, if direction="in" the in-degrees are used. If it is "out" the out degrees are used, otherwise "undirected" means that the sum of the in and out degrees are used.

sharedNbrs(k=1) (undirected)

for each edge adds

log(k + shared / minDeg)

where shared is the current number of shared neighbors between the two nodes, and minDeg is the minimum of the current degrees of the two nodes (i.e. the number of possible shared neighbors).

nodeLogMaxCov(name) (order-independent) (undirected)

For each edge (i,j) and nodal variable variable, add to the statistic

log(max(variable[i],variable[j]))

If the variable is a (partial) rank order of nodal inclusion into the network, this statistic can be useful in modeling the mean degree over the course of the growth process.

nodeFactor(name, direction="undirected") (order-independent) (undirected) (directed)

The name argument is a character vector giving one or more names of categorical attributes in the network's vertex attribute list. This term adds multiple network statistics to the model, one for each of (a subset of) the unique values of the attrname attribute (or each combination of the attributes given). Each of these statistics gives the number of times a node with that attribute or those attributes appears in an edge in the network. In particular, for edges whose endpoints both have the same attribute values, this value is counted twice. For directed networks, if direction="in" then in-edges are used and direction="out" indicates out-edges.

absDiff(name, power=1) (order-independent) (undirected) (directed)

The name argument is a character string giving the name of one or mode quantitative attribute in the network's vertex attribute list. This term adds one network statistic to the model equaling the sum of sum(abs(name[i]-name[j])^pow) for all edges (i,j) in the network.

Constraint Descriptions

boundedDegree(lower,upper) (order-independent) (undirected)

Adds a constraint that the degrees for the network must be between lower and upper.


[Package lolog version 1.3.1 Index]