Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ergm.bounddeg

Initializes the parameters to bound degree during sampling


Description

Not normally called directly by user, ergm.bounddeg initializes the list of parameters used to bound the degree during the Metropolis Hastings sampling process, and issues warnings if the original network doesn't meet the constraints specified by 'bounddeg'.

Usage

ergm.bounddeg(bounddeg, nw)

Arguments

bounddeg

a list of parameters which may contain the following for a network of size n nodes:

  • attribs: an nxp matrix, where entry ij is TRUE if node i has attribute j, and FALSE otherwise; default=an nx1 matrix of 1's

  • maxout : an nxp matrix, where entry ij is the maximum number of out degrees for node i to nodes with attribute j; default=an nxp matrix of the value (n-1)

  • maxin : defined similarly to maxout, but ignored for undirected networks; default=an nxp matrix of the value (n-1)

  • minout : defined similarly to maxout; default=an nxp matrix of 0's

  • minin : defined similarly to maxout, but ignored for undirected networks; default=an nxp matrix of 0's

nw

the orginal network specified to ergm in 'formula'

Details

In some modeling situations, the degree of certain nodes are constrained to lie in a certain range (rather than their theoretically possible range of 0 to n-1). Such sample space constraints may be incorporated into the ergm modeling process, and if so then the MCMC routine is prevented from visiting network states that violate any of these bounds.

In case there are categories of nodes and degree bounds for each set of categories, such constraints may be incorporated as well. For instance, if the nodes are girls and boys, and there is a maximum of 5 out-ties to boys and a maximum of 5 out-ties to girls for each node, we would define p to be 2, and the nxp matrix attribs would have TRUE in the first column (say) for exactly those nodes that are boys and TRUE in the second column for only the girls. The maxout matrix would consist of all 5s in this case, and the other arguments would be left as their default values.

Since the observed network is generally the beginning of the Markov chain, it must satisfy all of the degree constraints itself; thus, this function returns an error message if any bound is violated by the observed network.

Value

a list of parameters used to bound degree during sampling

condAllDegExact

always FALSE

attribs

as defined above

maxout

as defined above

maxin

as defined above

minout

as defined above

minin

as defined above

See Also


ergm

Fit, Simulate and Diagnose Exponential-Family Models for Networks

v3.11.0
GPL-3 + file LICENSE
Authors
Mark S. Handcock [aut], David R. Hunter [aut], Carter T. Butts [aut], Steven M. Goodreau [aut], Pavel N. Krivitsky [aut, cre] (<https://orcid.org/0000-0002-9101-3362>), Martina Morris [aut], Li Wang [ctb], Kirk Li [ctb], Skye Bender-deMoll [ctb], Chad Klumb [ctb], Michał Bojanowski [ctb], Ben Bolker [ctb]
Initial release
2020-10-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.