same_dist {ergmito}R Documentation

Compare pairs of networks to see if those came from the same distribution

Description

If two networks are of the same size, and their vertex attributes are equal in terms of set comparison, then we say those came from the same distribution

Usage

same_dist(net0, net1, attrnames = NULL, ...)

Arguments

net0, net1

Networks to be compared.

attrnames

Character vector. (optional) Names of the vertex attributes to be be compared on. This is ignored in the matrix case.

...

Ignored.

Details

This function is used during the call of ergmito_formulae to check whether the function can recycle previously computed statistics for the likelihood function. In the case of models that only contain structural terms, i.e. attribute less, this can save significant amount of computing time and memory.

Value

A logical with an attribute what. TRUE meaning that the two networks come from the same distribution, and FALSE meaning that they do not. If FALSE the what attribute will be equal to either "size" or the name of the attribute that failed the comparison.

Examples

data(fivenets)
same_dist(fivenets[[1]], fivenets[[2]]) # Yes, same size
same_dist(fivenets[[1]], fivenets[[2]], "female") # No, different attr dist

[Package ergmito version 0.3-1 Index]