| Type: | Package |
| Title: | Exponential-Family Models for Signed Networks |
| Version: | 0.1.3 |
| Description: | Extends the 'ergm.multi' packages from the Statnet suite to fit (temporal) exponential-family random graph models for signed networks. The framework models positive and negative ties as interdependent, which allows estimation and testing of structural balance theory. The package also includes options for descriptive summaries, visualization, and simulation of signed networks. See Krivitsky, Koehly, and Marcum (2020) <doi:10.1007/s11336-020-09720-7> and Fritz, C., Mehrl, M., Thurner, P. W., & Kauermann, G. (2025) <doi:10.1017/pan.2024.21>. |
| Encoding: | UTF-8 |
| LazyData: | true |
| LazyLoad: | yes |
| RoxygenNote: | 7.3.3 |
| RdMacros: | Rdpack |
| Imports: | statnet.common, network, ergm, ergm.multi, dplyr, magrittr, tergm, Rdpack, intergraph, graphlayouts, igraph, purrr, graphics, methods, utils |
| LinkingTo: | ergm.multi, ergm |
| Suggests: | knitr, rmarkdown, testthat |
| VignetteBuilder: | knitr |
| Depends: | R (≥ 3.5.0) |
| License: | MIT + file LICENSE |
| NeedsCompilation: | yes |
| Packaged: | 2026-07-20 15:25:01 UTC; mschalberger |
| Author: | Marc Schalberger [cre], Cornelius Fritz [aut], Pavel Krivitsky [ctb] |
| Maintainer: | Marc Schalberger <m.schalberger@fu-berlin.de> |
| Repository: | CRAN |
| Date/Publication: | 2026-07-20 19:40:02 UTC |
At least one common enemy
Description
This term adds one network statistic to the model equal to the number of edges in the network with at least one shared enemy. For a directed network, multiple shared enemy definitions are possible.
Usage
#binary: CE(type="OTP")
Arguments
type |
A string indicating the type of shared partner or path to be considered for directed networks: '"OTP"' (default for directed), '"ITP"', '"RTP"', '"OSP"', and '"ISP"'; has no effect for undirected. See the section below on Shared partner types for details. |
Shared partner types
While there is only one shared partner configuration in the undirected
case, nine distinct configurations are possible for directed graphs, selected
using the 'type' argument. Currently, terms may be defined with respect to
five of these configurations; they are defined here as follows (using
terminology from Butts (2008) and the 'relevent' package):
- Outgoing Two-path ('"OTP"'): vertex k is an OTP shared partner of ordered
pair (i,j) iff i \to k \to j. Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex k is an ITP shared partner of ordered
pair (i,j) iff j \to k \to i. Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex k is an RTP shared partner of ordered
pair (i,j) iff i \leftrightarrow k \leftrightarrow j.
- Outgoing Shared Partner ('"OSP"'): vertex k is an OSP shared partner of
ordered pair (i,j) iff i \to k, j \to k.
- Incoming Shared Partner ('"ISP"'): vertex k is an ISP shared partner of ordered
pair (i,j) iff k \to i, k \to j.
By default, outgoing two-paths ('"OTP"') are calculated. Note that Robins et al. (2009)
define closely related statistics to several of the above, using slightly different terminology.
Note
This term takes an additional term option (see ['options?ergm'][ergm-options]), 'cache.sp', controlling whether the implementation will cache the number of shared partners for each dyad in the network; this is usually enabled by default.
See Also
['ergmTerm'] for index of model terms currently visible to the package.
Keywords
None
At leat one common friend
Description
This term adds one network statistic to the model equal to the number of edges in the network with at least one shared friend. For a directed network, multiple shared friend definitions are possible.
Usage
#binary: CF(type="OTP")
Arguments
type |
A string indicating the type of shared partner or path to be considered for directed networks: '"OTP"' (default for directed), '"ITP"', '"RTP"', '"OSP"', and '"ISP"'; has no effect for undirected. See the section below on Shared partner types for details. |
Shared partner types
While there is only one shared partner configuration in the undirected
case, nine distinct configurations are possible for directed graphs, selected
using the 'type' argument. Currently, terms may be defined with respect to
five of these configurations; they are defined here as follows (using
terminology from Butts (2008) and the 'relevent' package):
- Outgoing Two-path ('"OTP"'): vertex k is an OTP shared partner of ordered
pair (i,j) iff i \to k \to j. Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex k is an ITP shared partner of ordered
pair (i,j) iff j \to k \to i. Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex k is an RTP shared partner of ordered
pair (i,j) iff i \leftrightarrow k \leftrightarrow j.
- Outgoing Shared Partner ('"OSP"'): vertex k is an OSP shared partner of
ordered pair (i,j) iff i \to k, j \to k.
- Incoming Shared Partner ('"ISP"'): vertex k is an ISP shared partner of ordered
pair (i,j) iff k \to i, k \to j.
By default, outgoing two-paths ('"OTP"') are calculated. Note that Robins et al. (2009)
define closely related statistics to several of the above, using slightly different terminology.
Note
This term takes an additional term option (see ['options?ergm'][ergm-options]), 'cache.sp', controlling whether the implementation will cache the number of shared partners for each dyad in the network; this is usually enabled by default.
See Also
['ergmTerm'] for index of model terms currently visible to the package.
Keywords
None
Evaluation of negative edges
Description
Evaluates the terms in 'formula' of the negative edges and sums the results elementwise.
Usage
# binary: Neg(formula)
Arguments
formula |
a one-sided [ergm()]-style formula with the terms to be evaluated |
Evaluation of positive edges
Description
Evaluates the terms in 'formula' of the positive edges and sums the results elementwise.
Usage
# binary: Pos(formula)
Arguments
formula |
a one-sided [ergm()]-style formula with the terms to be evaluated |
Delayed node matching on attribute (lag-1)
Description
Create a nodematch term where node attributes come from the previous network's node attribute 'attr'. The previous network used is the one indexed by the current 'GroupID' (equivalent to 'lag=1' previously). This constructs a temporary node attribute 'delnodecov_<attr>' on the current network (copied from the previous net) and calls 'nodematch' on that attribute.
Usage
# binary: delnodematch(attr)
Arguments
attr |
character attribute name to copy from the previous network into the current. |
Delayed reciprocity
Description
For the current network layer 'base', this term equals 1 for each directed edge i->j currently present where the reverse edge j->i was present in the previous network's same layer. The previous network used is the one indexed by the current 'GroupID' (i.e., the behaviour is the same as the prior 'lag=1' implementation). The term is provided as an edgecov (1/0).
Usage
# binary: delrecip(base)
Arguments
base |
character or numeric name/identifier of the layer to examine in the current network. |
Construct a Signed Network Representation for ERGM
Description
'Signed()' is a convenience wrapper around [Layer()] that constructs a two-layer multilayer network representation of a signed network, with one layer for positive ties ('pos') and one for negative ties ('neg'). It accepts several input formats and handles the layer construction and constraint specification automatically.
Usage
Signed(
...,
dual.sign = FALSE,
.symmetric = NULL,
.bipartite = NULL,
.active = NULL
)
Arguments
... |
Input networks or edge attributes. Three call signatures are supported:
|
dual.sign |
Logical. If 'FALSE' (the default), a constraint is added to prevent any dyad from simultaneously having both a positive and a negative tie. Set to 'TRUE' to allow dual-signed ties, e.g. in multiplex contexts where the same dyad may appear in both layers. |
.symmetric |
Passed to [Layer()]. A logical vector indicating which layers should be treated as undirected (symmetrized) even if the underlying network is directed. |
.bipartite |
Passed to [Layer()]. An integer vector indicating the bipartite block size for each layer. |
.active |
Passed to [Layer()]. A list of vertex attribute specifications, one per layer, indicating which vertices are active in each layer. |
Value
A combined multilayer ['network'] object as returned by [Layer()], with two layers named '"pos"' and '"neg"'.
See Also
[Layer()] for the underlying multilayer construction; ['ergm'][ergm::ergm] for model fitting on the resulting network.
Examples
## Not run:
# Two separate network objects
fit <- ergm.sign(Signed(pos_nw, neg_nw) ~ Pos(~edges) + Neg(~edges))
# Single network with a {-1, 0, 1}-valued edge attribute
fit <- ergm.sign(Signed(nw, "sign") ~ Pos(~edges) + Neg(~edges))
# Single network with two separate binary edge attributes
fit <- ergm.sign(Signed(nw, "is_pos", "is_neg") ~ Pos(~edges) + Neg(~edges))
# Allow dual-signed ties (pos and neg simultaneously)
fit <- ergm.sign(Signed(nw, "sign", dual.sign = TRUE) ~ Pos(~edges) + Neg(~edges))
## End(Not run)
Multilayer network to single layer network.
Description
Turn a multilayer network object into a single layer network object.
Usage
UnLayer(
net,
color_pos = "#008000",
color_neg = "#E3000F",
color_both = "#333333",
neg.lty = 2,
both.lty = 2
)
Arguments
net |
A signed network object of class |
color_pos |
Color for positive edges. Default is '#008000'. |
color_neg |
Color for negative edges. Default is '#E3000F'. |
color_both |
Color for edges that are both positive and negative. Default is '#333333'. |
neg.lty |
Line type for negative edges. Default is 2. |
both.lty |
Line type for edges that are both positive and negative. Default is 2. |
Value
Single layer network object or a list of network objects for dynamic.sign.
See Also
Examples
data("tribes")
tribes_sgl <- UnLayer(tribes)
Dyadwise shared enemies
Description
This term adds one network statistic to the model for each element in 'd' where the i th such statistic equals the number of dyads in the network with exactly 'd[i]' shared enemies. For a directed network, multiple shared enemies definitions are possible.
Usage
# binary: dse(d, type="OTP")
Shared partner types
While there is only one shared partner configuration in the undirected
case, nine distinct configurations are possible for directed graphs, selected
using the 'type' argument. Currently, terms may be defined with respect to
five of these configurations; they are defined here as follows (using
terminology from Butts (2008) and the 'relevent' package):
- Outgoing Two-path ('"OTP"'): vertex k is an OTP shared partner of ordered
pair (i,j) iff i \to k \to j. Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex k is an ITP shared partner of ordered
pair (i,j) iff j \to k \to i. Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex k is an RTP shared partner of ordered
pair (i,j) iff i \leftrightarrow k \leftrightarrow j.
- Outgoing Shared Partner ('"OSP"'): vertex k is an OSP shared partner of
ordered pair (i,j) iff i \to k, j \to k.
- Incoming Shared Partner ('"ISP"'): vertex k is an ISP shared partner of ordered
pair (i,j) iff k \to i, k \to j.
By default, outgoing two-paths ('"OTP"') are calculated. Note that Robins et al. (2009)
define closely related statistics to several of the above, using slightly different terminology.
Note
This term takes an additional term option (see ['options?ergm'][ergm-options]), 'cache.sp', controlling whether the implementation will cache the number of shared partners for each dyad in the network; this is usually enabled by default.
See Also
['ergmTerm'] for index of model terms currently visible to the package.
Keywords
None
Dyadwise shared friends
Description
This term adds one network statistic to the model for each element in 'd' where the i th such statistic equals the number of dyads in the network with exactly 'd[i]' shared friends. For a directed network, multiple shared friends definitions are possible.
Usage
# binary: dsf(d, type="OTP")
Shared partner types
While there is only one shared partner configuration in the undirected
case, nine distinct configurations are possible for directed graphs, selected
using the 'type' argument. Currently, terms may be defined with respect to
five of these configurations; they are defined here as follows (using
terminology from Butts (2008) and the 'relevent' package):
- Outgoing Two-path ('"OTP"'): vertex k is an OTP shared partner of ordered
pair (i,j) iff i \to k \to j. Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex k is an ITP shared partner of ordered
pair (i,j) iff j \to k \to i. Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex k is an RTP shared partner of ordered
pair (i,j) iff i \leftrightarrow k \leftrightarrow j.
- Outgoing Shared Partner ('"OSP"'): vertex k is an OSP shared partner of
ordered pair (i,j) iff i \to k, j \to k.
- Incoming Shared Partner ('"ISP"'): vertex k is an ISP shared partner of ordered
pair (i,j) iff k \to i, k \to j.
By default, outgoing two-paths ('"OTP"') are calculated. Note that Robins et al. (2009)
define closely related statistics to several of the above, using slightly different terminology.
Note
This term takes an additional term option (see ['options?ergm'][ergm-options]), 'cache.sp', controlling whether the implementation will cache the number of shared partners for each dyad in the network; this is usually enabled by default.
See Also
['ergmTerm'] for index of model terms currently visible to the package.
Keywords
None
ergm.sign: A Package for Exponential Random Graph Models for Signed Networks
Description
The ergm.sign package implements tools to simulate and estimate Signed Exponential Random Graph Models and Temporal Signed Exponential Random Graph Models.
ergm for signed networks. The mple_sign function
is used when estimate = "MPLE" or to compute initial values for MCMC.
For other networks, behavior is identical to ergm::ergm.
Usage
ergm.sign(
formula,
estimate = "MLE",
eval_lik = FALSE,
...,
control = control.ergm()
)
Arguments
formula |
An |
estimate |
Character string specifying the estimation method. Options are "MLE" (default) or "MPLE". |
eval_lik |
Logical indicating whether to evaluate the likelihood using path sampling. |
... |
Additional arguments passed to |
control |
A |
Value
An ergm object.
Author(s)
Marc Schalberger
Examples
## Not run:
ergm.sign(signed_net ~ edges + triangles)
## End(Not run)
Edgewise shared enemies
Description
This term adds one network statistic to the model for each element in 'd' where the i th such statistic equals the number of edges in the network with exactly 'd[i]' shared enemies. For a directed network, multiple shared enemy definitions are possible.
Usage
# binary: ese(d, type="OTP", L.base=NULL)
Arguments
d |
a vector of distinct integers |
lag |
logical; if TRUE, compute the lagged version of the ese statistic based on the previous time point's network |
type |
A string indicating the type of shared partner or path to be considered for directed networks: '"OTP"' (default for directed), '"ITP"', '"RTP"', '"OSP"', and '"ISP"'; has no effect for undirected. See the section below on Shared partner types for details. |
base |
specify the base of the triad, either by '+' and '-' or 1 and -1 |
Shared partner types
While there is only one shared partner configuration in the undirected
case, nine distinct configurations are possible for directed graphs, selected
using the 'type' argument. Currently, terms may be defined with respect to
five of these configurations; they are defined here as follows (using
terminology from Butts (2008) and the 'relevent' package):
- Outgoing Two-path ('"OTP"'): vertex k is an OTP shared partner of ordered
pair (i,j) iff i \to k \to j. Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex k is an ITP shared partner of ordered
pair (i,j) iff j \to k \to i. Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex k is an RTP shared partner of ordered
pair (i,j) iff i \leftrightarrow k \leftrightarrow j.
- Outgoing Shared Partner ('"OSP"'): vertex k is an OSP shared partner of
ordered pair (i,j) iff i \to k, j \to k.
- Incoming Shared Partner ('"ISP"'): vertex k is an ISP shared partner of ordered
pair (i,j) iff k \to i, k \to j.
By default, outgoing two-paths ('"OTP"') are calculated. Note that Robins et al. (2009)
define closely related statistics to several of the above, using slightly different terminology.
Note
This term takes an additional term option (see ['options?ergm'][ergm-options]), 'cache.sp', controlling whether the implementation will cache the number of shared partners for each dyad in the network; this is usually enabled by default.
See Also
['ergmTerm'] for index of model terms currently visible to the package.
Keywords
None
Edgewise shared friends
Description
This term adds one network statistic to the model for each element in 'd' where the i th such statistic equals the number of edges in the network with exactly 'd[i]' shared friends. For a directed network, multiple shared friend definitions are possible.
Usage
# binary: esf(d, type="OTP", L.base=NULL)
Arguments
d |
a vector of distinct integers |
lag |
logical; if TRUE, compute the lagged version of the esf statistic based on the previous time point's network |
type |
A string indicating the type of shared partner or path to be considered for directed networks: '"OTP"' (default for directed), '"ITP"', '"RTP"', '"OSP"', and '"ISP"'; has no effect for undirected. See the section below on Shared partner types for details. |
base |
specify the base of the triad, either by '+' and '-' or 1 and -1 |
Shared partner types
While there is only one shared partner configuration in the undirected
case, nine distinct configurations are possible for directed graphs, selected
using the 'type' argument. Currently, terms may be defined with respect to
five of these configurations; they are defined here as follows (using
terminology from Butts (2008) and the 'relevent' package):
- Outgoing Two-path ('"OTP"'): vertex k is an OTP shared partner of ordered
pair (i,j) iff i \to k \to j. Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex k is an ITP shared partner of ordered
pair (i,j) iff j \to k \to i. Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex k is an RTP shared partner of ordered
pair (i,j) iff i \leftrightarrow k \leftrightarrow j.
- Outgoing Shared Partner ('"OSP"'): vertex k is an OSP shared partner of
ordered pair (i,j) iff i \to k, j \to k.
- Incoming Shared Partner ('"ISP"'): vertex k is an ISP shared partner of ordered
pair (i,j) iff k \to i, k \to j.
By default, outgoing two-paths ('"OTP"') are calculated. Note that Robins et al. (2009)
define closely related statistics to several of the above, using slightly different terminology.
Note
This term takes an additional term option (see ['options?ergm'][ergm-options]), 'cache.sp', controlling whether the implementation will cache the number of shared partners for each dyad in the network; this is usually enabled by default.
See Also
['ergmTerm'] for index of model terms currently visible to the package.
Keywords
None
Evaluate Log-Likelihood via Path Sampling
Description
This function evaluates the log-likelihood of a fitted signed ergm model using path sampling.
Usage
eval_loglik(object)
Arguments
object |
A fitted signed ergm model object. |
Value
A logLik object containing the evaluated log-likelihood, degrees of freedom, and number of observations.
Conduct Goodness-of-Fit Diagnostics for a Signed ERGM
Description
Conduct Goodness-of-Fit Diagnostics for a Signed ERGM
Usage
## S3 method for class 'sign'
gof(object, nsim = 200, seed = NULL, ...)
Arguments
object |
A fitted signed ERGM (SERGM) object of class |
nsim |
Integer; number of simulated networks. Defaults to 200. |
seed |
Optional integer seed. |
... |
Additional arguments passed to methods. |
Value
An object of class "gof.sign".
Print shows a summary; plot() produces diagnostic boxplots.
Geometrically weighted dyadwise shared enemies distribution
Description
This term adds one network statistic to the model equal to the geometrically weighted dyadwise shared enemies distribution with decay parameter. Note that the GWDSE statistic is equal to the sum of GWNSE plus GWESE. For a directed network, multiple shared friend definitions are possible.
Usage
# binary: gwdse(decay, fixed=FALSE, cutoff=30, type="OTP")
Arguments
decay |
nonnegative decay parameter for the shared enemy or selected directed analogue count; required if 'fixed=TRUE' and ignored with a warning otherwise. |
fixed |
optional argument indicating whether the 'decay' parameter is fixed at the given value, or is to be fit as a curved exponential-family model (see Hunter and Handcock, 2006). The default is 'FALSE' , which means the scale parameter is not fixed and thus the model is a curved exponential family. |
cutoff |
This optional argument sets the number of underlying DSE terms to use in computing the statistics when 'fixed=FALSE', in order to reduce the computational burden. Its default value can also be controlled by the 'gw.cutoff' term option control parameter. (See '?control.ergm'.) |
type |
A string indicating the type of shared partner or path to be considered for directed networks: '"OTP"' (default for directed), '"ITP"', '"RTP"', '"OSP"', and '"ISP"'; has no effect for undirected. See the section below on Shared partner types for details. |
Shared partner types
While there is only one shared partner configuration in the undirected
case, nine distinct configurations are possible for directed graphs, selected
using the 'type' argument. Currently, terms may be defined with respect to
five of these configurations; they are defined here as follows (using
terminology from Butts (2008) and the 'relevent' package):
- Outgoing Two-path ('"OTP"'): vertex k is an OTP shared partner of ordered
pair (i,j) iff i \to k \to j. Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex k is an ITP shared partner of ordered
pair (i,j) iff j \to k \to i. Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex k is an RTP shared partner of ordered
pair (i,j) iff i \leftrightarrow k \leftrightarrow j.
- Outgoing Shared Partner ('"OSP"'): vertex k is an OSP shared partner of
ordered pair (i,j) iff i \to k, j \to k.
- Incoming Shared Partner ('"ISP"'): vertex k is an ISP shared partner of ordered
pair (i,j) iff k \to i, k \to j.
By default, outgoing two-paths ('"OTP"') are calculated. Note that Robins et al. (2009)
define closely related statistics to several of the above, using slightly different terminology.
Note
This term takes an additional term option (see ['options?ergm'][ergm-options]), 'cache.sp', controlling whether the implementation will cache the number of shared partners for each dyad in the network; this is usually enabled by default.
See Also
['ergmTerm'] for index of model terms currently visible to the package.
Keywords
None
Geometrically weighted dyadwise shared friends distribution
Description
This term adds one network statistic to the model equal to the geometrically weighted dyadwise shared friends distribution with decay parameter. Note that the GWDSF statistic is equal to the sum of GWNSF plus GWESF. For a directed network, multiple shared friend definitions are possible.
Usage
# binary: gwdsf(decay, fixed=FALSE, cutoff=30, type="OTP")
Arguments
decay |
nonnegative decay parameter for the shared friend or selected directed analogue count; required if 'fixed=TRUE' and ignored with a warning otherwise. |
fixed |
optional argument indicating whether the 'decay' parameter is fixed at the given value, or is to be fit as a curved exponential-family model (see Hunter and Handcock, 2006). The default is 'FALSE' , which means the scale parameter is not fixed and thus the model is a curved exponential family. |
cutoff |
This optional argument sets the number of underlying DSF terms to use in computing the statistics when 'fixed=FALSE', in order to reduce the computational burden. Its default value can also be controlled by the 'gw.cutoff' term option control parameter. (See '?control.ergm'.) |
type |
A string indicating the type of shared partner or path to be considered for directed networks: '"OTP"' (default for directed), '"ITP"', '"RTP"', '"OSP"', and '"ISP"'; has no effect for undirected. See the section below on Shared partner types for details. |
Shared partner types
While there is only one shared partner configuration in the undirected
case, nine distinct configurations are possible for directed graphs, selected
using the 'type' argument. Currently, terms may be defined with respect to
five of these configurations; they are defined here as follows (using
terminology from Butts (2008) and the 'relevent' package):
- Outgoing Two-path ('"OTP"'): vertex k is an OTP shared partner of ordered
pair (i,j) iff i \to k \to j. Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex k is an ITP shared partner of ordered
pair (i,j) iff j \to k \to i. Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex k is an RTP shared partner of ordered
pair (i,j) iff i \leftrightarrow k \leftrightarrow j.
- Outgoing Shared Partner ('"OSP"'): vertex k is an OSP shared partner of
ordered pair (i,j) iff i \to k, j \to k.
- Incoming Shared Partner ('"ISP"'): vertex k is an ISP shared partner of ordered
pair (i,j) iff k \to i, k \to j.
By default, outgoing two-paths ('"OTP"') are calculated. Note that Robins et al. (2009)
define closely related statistics to several of the above, using slightly different terminology.
Note
This term takes an additional term option (see ['options?ergm'][ergm-options]), 'cache.sp', controlling whether the implementation will cache the number of shared partners for each dyad in the network; this is usually enabled by default.
See Also
['ergmTerm'] for index of model terms currently visible to the package.
Keywords
None
Geometrically weighted edgewise shared enemy distribution
Description
This term adds a statistic equal to the geometrically weighted edgewise (not dyadwise) shared enemy distribution with decay parameter. For a directed network, multiple shared enemy definitions are possible.
Usage
# binary: gwese(decay, fixed=FALSE, cutoff=30, type="OTP", base=NULL)
Arguments
decay |
nonnegative decay parameter for the shared enemy or selected directed analogue count; required if 'fixed=TRUE' and ignored with a warning otherwise. |
fixed |
optional argument indicating whether the 'decay' parameter is fixed at the given value, or is to be fit as a curved exponential-family model (see Hunter and Handcock, 2006). The default is 'FALSE' , which means the scale parameter is not fixed and thus the model is a curved exponential family. |
lag |
logical; if TRUE, compute the lagged version of the gwese statistic based on the previous time point's network |
cutoff |
This optional argument sets the number of underlying ESE terms to use in computing the statistics when 'fixed=FALSE', in order to reduce the computational burden. Its default value can also be controlled by the 'gw.cutoff' term option control parameter. (See '?control.ergm'.) |
type |
A string indicating the type of shared partner or path to be considered for directed networks: '"OTP"' (default for directed), '"ITP"', '"RTP"', '"OSP"', and '"ISP"'; has no effect for undirected. See the section below on Shared partner types for details. |
base |
specify the base of the triad, either by '+' and '-' or 1 and -1 |
Shared partner types
While there is only one shared partner configuration in the undirected
case, nine distinct configurations are possible for directed graphs, selected
using the 'type' argument. Currently, terms may be defined with respect to
five of these configurations; they are defined here as follows (using
terminology from Butts (2008) and the 'relevent' package):
- Outgoing Two-path ('"OTP"'): vertex k is an OTP shared partner of ordered
pair (i,j) iff i \to k \to j. Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex k is an ITP shared partner of ordered
pair (i,j) iff j \to k \to i. Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex k is an RTP shared partner of ordered
pair (i,j) iff i \leftrightarrow k \leftrightarrow j.
- Outgoing Shared Partner ('"OSP"'): vertex k is an OSP shared partner of
ordered pair (i,j) iff i \to k, j \to k.
- Incoming Shared Partner ('"ISP"'): vertex k is an ISP shared partner of ordered
pair (i,j) iff k \to i, k \to j.
By default, outgoing two-paths ('"OTP"') are calculated. Note that Robins et al. (2009)
define closely related statistics to several of the above, using slightly different terminology.
Note
This term takes an additional term option (see ['options?ergm'][ergm-options]), 'cache.sp', controlling whether the implementation will cache the number of shared partners for each dyad in the network; this is usually enabled by default.
See Also
['ergmTerm'] for index of model terms currently visible to the package.
Keywords
None
Geometrically weighted edgewise shared friend distribution
Description
This term adds a statistic equal to the geometrically weighted edgewise (not dyadwise) shared friend distribution with decay parameter. For a directed network, multiple shared friend definitions are possible.
Usage
# binary: gwesf(decay, fixed=FALSE, cutoff=30, type="OTP", base=NULL)
Arguments
decay |
nonnegative decay parameter for the shared friend or selected directed analogue count; required if 'fixed=TRUE' and ignored with a warning otherwise. |
fixed |
optional argument indicating whether the 'decay' parameter is fixed at the given value, or is to be fit as a curved exponential-family model (see Hunter and Handcock, 2006). The default is 'FALSE' , which means the scale parameter is not fixed and thus the model is a curved exponential family. |
lag |
logical; if TRUE, compute the lagged version of the gwesf statistic based on the previous time point's network |
cutoff |
This optional argument sets the number of underlying ESF terms to use in computing the statistics when 'fixed=FALSE', in order to reduce the computational burden. Its default value can also be controlled by the 'gw.cutoff' term option control parameter. (See '?control.ergm'.) |
type |
A string indicating the type of shared partner or path to be considered for directed networks: '"OTP"' (default for directed), '"ITP"', '"RTP"', '"OSP"', and '"ISP"'; has no effect for undirected. See the section below on Shared partner types for details. |
base |
specify the base of the triad, either by '+' and '-' or 1 and -1 |
Shared partner types
While there is only one shared partner configuration in the undirected
case, nine distinct configurations are possible for directed graphs, selected
using the 'type' argument. Currently, terms may be defined with respect to
five of these configurations; they are defined here as follows (using
terminology from Butts (2008) and the 'relevent' package):
- Outgoing Two-path ('"OTP"'): vertex k is an OTP shared partner of ordered
pair (i,j) iff i \to k \to j. Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex k is an ITP shared partner of ordered
pair (i,j) iff j \to k \to i. Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex k is an RTP shared partner of ordered
pair (i,j) iff i \leftrightarrow k \leftrightarrow j.
- Outgoing Shared Partner ('"OSP"'): vertex k is an OSP shared partner of
ordered pair (i,j) iff i \to k, j \to k.
- Incoming Shared Partner ('"ISP"'): vertex k is an ISP shared partner of ordered
pair (i,j) iff k \to i, k \to j.
By default, outgoing two-paths ('"OTP"') are calculated. Note that Robins et al. (2009)
define closely related statistics to several of the above, using slightly different terminology.
Note
This term takes an additional term option (see ['options?ergm'][ergm-options]), 'cache.sp', controlling whether the implementation will cache the number of shared partners for each dyad in the network; this is usually enabled by default.
See Also
['ergmTerm'] for index of model terms currently visible to the package.
Keywords
None
Geometrically weighted non-edgewise shared enemey distribution
Description
This term adds a statistic equal to the geometrically weighted nonedgewise (that is, over dyads that do not have an edge) shared enemy distribution with decay parameter. For a directed network, multiple shared enemy definitions are possible.
Usage
# binary: gwnse(decay, fixed=FALSE, cutoff=30, type="OTP", base=NULL)
Arguments
decay |
nonnegative decay parameter for the shared enemy or selected directed analogue count; required if 'fixed=TRUE' and ignored with a warning otherwise. |
fixed |
optional argument indicating whether the 'decay' parameter is fixed at the given value, or is to be fit as a curved exponential-family model (see Hunter and Handcock, 2006). The default is 'FALSE' , which means the scale parameter is not fixed and thus the model is a curved exponential family. |
cutoff |
This optional argument sets the number of underlying NSE terms to use in computing the statistics when 'fixed=FALSE', in order to reduce the computational burden. Its default value can also be controlled by the 'gw.cutoff' term option control parameter. (See '?control.ergm'.) |
type |
A string indicating the type of shared partner or path to be considered for directed networks: '"OTP"' (default for directed), '"ITP"', '"RTP"', '"OSP"', and '"ISP"'; has no effect for undirected. See the section below on Shared partner types for details. |
base |
specify the base of the triad, either by '+' and '-' or 1 and -1 |
Shared partner types
While there is only one shared partner configuration in the undirected
case, nine distinct configurations are possible for directed graphs, selected
using the 'type' argument. Currently, terms may be defined with respect to
five of these configurations; they are defined here as follows (using
terminology from Butts (2008) and the 'relevent' package):
- Outgoing Two-path ('"OTP"'): vertex k is an OTP shared partner of ordered
pair (i,j) iff i \to k \to j. Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex k is an ITP shared partner of ordered
pair (i,j) iff j \to k \to i. Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex k is an RTP shared partner of ordered
pair (i,j) iff i \leftrightarrow k \leftrightarrow j.
- Outgoing Shared Partner ('"OSP"'): vertex k is an OSP shared partner of
ordered pair (i,j) iff i \to k, j \to k.
- Incoming Shared Partner ('"ISP"'): vertex k is an ISP shared partner of ordered
pair (i,j) iff k \to i, k \to j.
By default, outgoing two-paths ('"OTP"') are calculated. Note that Robins et al. (2009)
define closely related statistics to several of the above, using slightly different terminology.
Note
This term takes an additional term option (see ['options?ergm'][ergm-options]), 'cache.sp', controlling whether the implementation will cache the number of shared partners for each dyad in the network; this is usually enabled by default.
See Also
['ergmTerm'] for index of model terms currently visible to the package.
Keywords
None
Geometrically weighted non-edgewise shared friend distribution
Description
This term adds a statistic equal to the geometrically weighted nonedgewise (that is, over dyads that do not have an edge) shared friend distribution with decay parameter. For a directed network, multiple shared friend definitions are possible.
Usage
# binary: gwnsf(decay, fixed=FALSE, cutoff=30, type="OTP", base=NULL)
Arguments
decay |
nonnegative decay parameter for the shared friend or selected directed analogue count; required if 'fixed=TRUE' and ignored with a warning otherwise. |
fixed |
optional argument indicating whether the 'decay' parameter is fixed at the given value, or is to be fit as a curved exponential-family model (see Hunter and Handcock, 2006). The default is 'FALSE' , which means the scale parameter is not fixed and thus the model is a curved exponential family. |
cutoff |
This optional argument sets the number of underlying NSF terms to use in computing the statistics when 'fixed=FALSE', in order to reduce the computational burden. Its default value can also be controlled by the 'gw.cutoff' term option control parameter. (See '?control.ergm'.) |
type |
A string indicating the type of shared partner or path to be considered for directed networks: '"OTP"' (default for directed), '"ITP"', '"RTP"', '"OSP"', and '"ISP"'; has no effect for undirected. See the section below on Shared partner types for details. |
base |
specify the base of the triad, either by '+' and '-' or 1 and -1 |
Shared partner types
While there is only one shared partner configuration in the undirected
case, nine distinct configurations are possible for directed graphs, selected
using the 'type' argument. Currently, terms may be defined with respect to
five of these configurations; they are defined here as follows (using
terminology from Butts (2008) and the 'relevent' package):
- Outgoing Two-path ('"OTP"'): vertex k is an OTP shared partner of ordered
pair (i,j) iff i \to k \to j. Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex k is an ITP shared partner of ordered
pair (i,j) iff j \to k \to i. Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex k is an RTP shared partner of ordered
pair (i,j) iff i \leftrightarrow k \leftrightarrow j.
- Outgoing Shared Partner ('"OSP"'): vertex k is an OSP shared partner of
ordered pair (i,j) iff i \to k, j \to k.
- Incoming Shared Partner ('"ISP"'): vertex k is an ISP shared partner of ordered
pair (i,j) iff k \to i, k \to j.
By default, outgoing two-paths ('"OTP"') are calculated. Note that Robins et al. (2009)
define closely related statistics to several of the above, using slightly different terminology.
Note
This term takes an additional term option (see ['options?ergm'][ergm-options]), 'cache.sp', controlling whether the implementation will cache the number of shared partners for each dyad in the network; this is usually enabled by default.
See Also
['ergmTerm'] for index of model terms currently visible to the package.
Keywords
None
Fit an ERGM with MPLE using a logistic regression model
Description
Returns a fitted logistic regression model used to calculate the maximum pseudolikelihood estimate (MPLE) of an exponential random graph model (ERGM).
Usage
mple_sign(
formula,
control = control.ergm(),
seed = NULL,
eval_lik = FALSE,
...
)
Arguments
formula |
An ERGM formula with the network on the left-hand side. |
control |
A list of control parameters for |
seed |
Optional integer to set the random seed for reproducibility when simulating networks for Godambe covariance estimation. |
eval_lik |
Logical indicating whether to evaluate the likelihood using path sampling. |
... |
Additional arguments passed to |
Details
The MPLE is calculated by first computing matrices of positive and negative change statistics. These are then used to estimate the MPLE via logistic regression. Optionally, the covariance can be estimated using the Godambe method.
Value
An object of class ergm.
See Also
Examples
data(tribes)
mple_sign(tribes ~ Pos(~edges) + Neg(~edges))
Create Signed Network Object
Description
Turn adjacency matrices or edgelists into static or dynamic signed networks.
Usage
network.sign(
mat = NULL,
pos.mat = NULL,
neg.mat = NULL,
directed = FALSE,
loops = FALSE,
matrix.type = c("adjacency", "edgelist"),
vertex.names = NULL,
vertex.attr = NULL,
dual.sign = FALSE,
timepoints = NULL,
tie.breaker = c("zero", "positive", "negative", "first", "last"),
...
)
Arguments
mat |
(List of) signed adjacency matrices or edgelists. For dynamic networks, provide a list. Adjacency matrices must contain only -1, 0, or 1. Edgelists must have three columns: "From", "To", and "Sign". |
pos.mat |
Optional. Positive adjacency matrix or list of matrices. |
neg.mat |
Optional. Negative adjacency matrix or list of matrices. If provided, these are treated as two separate layers of the same network. |
directed |
Logical; should edges be interpreted as directed? Defaults to FALSE. |
loops |
Logical; should loops be allowed? Defaults to FALSE. |
matrix.type |
Either "adjacency" or "edgelist". |
vertex.names |
Optional. A vector or list of vertex names. |
vertex.attr |
Optional. Additional vertex attributes. |
dual.sign |
Logical. Allow positive and negative edges simultaneously between the same pair. |
timepoints |
Optional. Pooling definition for dynamic networks. |
tie.breaker |
How to resolve ties when pooling signed matrices. |
... |
Additional arguments passed to 'network::network'. |
Value
A signed network of class 'static.sign' or 'dynamic.sign'.
Combine Signed Networks into a Multi- or Dynamic-Network Object
Description
Creates a composite network object from multiple signed networks, suitable for ERGM modeling. Can represent either a multilayer or dynamic signed network structure.
Usage
networks.sign(..., dynamic = FALSE, dual.sign = FALSE)
Arguments
... |
One or more signed networks (objects of class |
dynamic |
Logical. If |
dual.sign |
Logical. If |
Value
A combined network object of class "multi.sign" or
"dynamic.sign", with the appropriate ERGM constraint formula.
Examples
data("tribes")
multi_net <- networks.sign(tribes, tribes)
dyn_net <- networks.sign(list(tribes, tribes), dynamic = TRUE)
Non-edgewise shared enemies
Description
This term adds one network statistic to the model for each element in 'd' where the i th such statistic equals the number of non-edges in the network with exactly 'd[i]' shared enemies. For a directed network, multiple shared enemy definitions are possible.
Usage
# binary: nse(d, type="OTP", base=NULL)
Arguments
d |
a vector of distinct integers |
type |
A string indicating the type of shared partner or path to be considered for directed networks: '"OTP"' (default for directed), '"ITP"', '"RTP"', '"OSP"', and '"ISP"'; has no effect for undirected. See the section below on Shared partner types for details. |
base |
specify the base of the triad, either by '+' and '-' or 1 and -1 |
Shared partner types
While there is only one shared partner configuration in the undirected
case, nine distinct configurations are possible for directed graphs, selected
using the 'type' argument. Currently, terms may be defined with respect to
five of these configurations; they are defined here as follows (using
terminology from Butts (2008) and the 'relevent' package):
- Outgoing Two-path ('"OTP"'): vertex k is an OTP shared partner of ordered
pair (i,j) iff i \to k \to j. Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex k is an ITP shared partner of ordered
pair (i,j) iff j \to k \to i. Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex k is an RTP shared partner of ordered
pair (i,j) iff i \leftrightarrow k \leftrightarrow j.
- Outgoing Shared Partner ('"OSP"'): vertex k is an OSP shared partner of
ordered pair (i,j) iff i \to k, j \to k.
- Incoming Shared Partner ('"ISP"'): vertex k is an ISP shared partner of ordered
pair (i,j) iff k \to i, k \to j.
By default, outgoing two-paths ('"OTP"') are calculated. Note that Robins et al. (2009)
define closely related statistics to several of the above, using slightly different terminology.
Note
This term takes an additional term option (see ['options?ergm'][ergm-options]), 'cache.sp', controlling whether the implementation will cache the number of shared partners for each dyad in the network; this is usually enabled by default.
See Also
['ergmTerm'] for index of model terms currently visible to the package.
Keywords
None
Non-edgewise shared friends
Description
This term adds one network statistic to the model for each element in 'd' where the i th such statistic equals the number of non-edges in the network with exactly 'd[i]' shared friends. For a directed network, multiple shared friend definitions are possible.
Usage
# binary: nsf(d, type="OTP", base=NULL)
Arguments
d |
a vector of distinct integers |
type |
A string indicating the type of shared partner or path to be considered for directed networks: '"OTP"' (default for directed), '"ITP"', '"RTP"', '"OSP"', and '"ISP"'; has no effect for undirected. See the section below on Shared partner types for details. |
base |
specify the base of the triad, either by '+' and '-' or 1 and -1 |
Shared partner types
While there is only one shared partner configuration in the undirected
case, nine distinct configurations are possible for directed graphs, selected
using the 'type' argument. Currently, terms may be defined with respect to
five of these configurations; they are defined here as follows (using
terminology from Butts (2008) and the 'relevent' package):
- Outgoing Two-path ('"OTP"'): vertex k is an OTP shared partner of ordered
pair (i,j) iff i \to k \to j. Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex k is an ITP shared partner of ordered
pair (i,j) iff j \to k \to i. Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex k is an RTP shared partner of ordered
pair (i,j) iff i \leftrightarrow k \leftrightarrow j.
- Outgoing Shared Partner ('"OSP"'): vertex k is an OSP shared partner of
ordered pair (i,j) iff i \to k, j \to k.
- Incoming Shared Partner ('"ISP"'): vertex k is an ISP shared partner of ordered
pair (i,j) iff k \to i, k \to j.
By default, outgoing two-paths ('"OTP"') are calculated. Note that Robins et al. (2009)
define closely related statistics to several of the above, using slightly different terminology.
Note
This term takes an additional term option (see ['options?ergm'][ergm-options]), 'cache.sp', controlling whether the implementation will cache the number of shared partners for each dyad in the network; this is usually enabled by default.
See Also
['ergmTerm'] for index of model terms currently visible to the package.
Keywords
None
Visualization for Dynamic Signed Networks
Description
plot.dynamic.sign() visualizes a dynamic signed network over multiple timepoints.
Usage
## S3 method for class 'dynamic.sign'
plot(
x,
col_pos = "#008000",
col_neg = "#E3000F",
col_both = "#333333",
alpha = 1,
neg.lty = 1,
both.lty = 1,
inv_weights = TRUE,
time = NULL,
titles = x %n% "names",
fix.pos = TRUE,
coord = NULL,
...
)
Arguments
x |
A signed network object of class |
col_pos |
Color for positive edges. Default is green. |
col_neg |
Color for negative edges. Default is red. |
col_both |
Color for edges that are both positive and negative. Default is darkgrey. |
alpha |
Numeric between 0 and 1 for edge transparency. Default is 1 (fully opaque). |
neg.lty |
Line type for negative edges. Default is "solid". Other options are "dotted" and "dashed". |
both.lty |
Line type for edges that are both positive and negative. Default is "solid". Other options are "dotted" and "dashed". |
inv_weights |
Logical. If TRUE, edge weights are inverted (1/weights) so positive edges pull nodes closer together. Default is TRUE. |
time |
A vector of integers indicating which timepoints should be visualized. Defaults to all. |
titles |
A character vector of names for the timepoints. |
fix.pos |
Logical. If TRUE, the layout is fixed across timepoints based on the first timepoint. Default is TRUE. |
coord |
Optional matrix of coordinates for node positions. If NULL, layout is computed using stress majorization. |
... |
Additional arguments passed to the plot function. |
Value
A list of plots, one for each selected timepoint.
Layout
Uses a force-directed graph layout based on stress majorization, implemented in the graphlayouts package
via layout_with_stress(). Similar to Kamada-Kawai, but generally faster and with better results.
Visualization for Signed Networks
Description
Functions to visualize signed networks in static or dynamic form.
Usage
## S3 method for class 'static.sign'
plot(
x,
col_pos = "#008000",
col_neg = "#E3000F",
col_both = "#333333",
alpha = 1,
neg.lty = 1,
both.lty = 1,
inv_weights = TRUE,
coord = NULL,
...
)
Arguments
x |
A signed network object of class |
col_pos |
Color for positive edges. Default is green. |
col_neg |
Color for negative edges. Default is red. |
col_both |
Color for edges that are both positive and negative. Default is darkgrey. |
alpha |
Numeric between 0 and 1 for edge transparency. Default is 1 (fully opaque). |
neg.lty |
Line type for negative edges. Default is "solid". Other options are "dotted" and "dashed". |
both.lty |
Line type for edges that are both positive and negative. Default is "solid". Other options are "dotted" and "dashed". |
inv_weights |
Logical. If TRUE, edge weights are inverted (1/weights) so positive edges pull nodes closer together. Default is TRUE. |
coord |
Optional matrix of coordinates for node positions. If NULL, layout is computed using stress majorization. |
... |
Additional arguments passed to the plot function. |
Value
A plot of the signed network.
Layout
Uses a force-directed graph layout based on stress majorization, implemented in the graphlayouts package
via layout_with_stress(). Similar to Kamada-Kawai, but generally faster and with better results.
Static signed networks
plot.static.sign() visualizes a single (static) signed network.
References
Gansner ER, Koren Y, North S (2004). “Graph drawing by stress majorization.” In International Symposium on Graph Drawing, 239–250. Springer.
See Also
Examples
data("tribes")
plot(tribes, col_pos = "green", col_neg = "red")
Pool Timepoints of a Dynamic Signed Network
Description
Aggregates timepoints of a dynamic signed network into pooled periods using majority-vote logic, with configurable tie-breaking.
Usage
pool.sign(
net,
timepoints,
tie.breaker = c("zero", "positive", "negative", "first", "last"),
dual.sign = FALSE
)
Arguments
net |
A dynamic signed network of class 'dynamic.sign'. |
timepoints |
Either an integer specifying the number of equal-sized groups, or a list of integer vectors specifying which timepoints belong to each group. E.g., 'list(c(1,2,3), c(4,5,6))' or '3' for three equal groups. |
tie.breaker |
How to resolve ties when positive and negative counts are equal. One of '"zero"' (default), '"positive"', '"negative"', '"first"', '"last"'. |
dual.sign |
Logical. Allow positive and negative edges simultaneously between the same pair. Defaults to FALSE. |
Value
A dynamic signed network of class 'dynamic.sign' with one network per pooled group, or a 'static.sign' network if only one group results.
Conflict Events in Syrian Civil War
Description
A dynamic network of combat events in the Syrian civil war between 2017 and 2025. The raw data comes from the Armed Conflict Location & Event Data Project Raleigh et al. (2010).
Format
An undirected dynamic.sign object with no loops and eight timepoints.
References
Fritz C, Mehrl M, Thurner PW, Kauermann G (2023). “All that glitters is not gold: Relational events models with spurious events.” Network Science, 11(2), 184–204., Raleigh C, Linke r, Hegre H, Karlsen J (2010). “Introducing ACLED: An armed conflict location and event dataset.” Journal of peace research, 47(5), 651–660.
Examples
data(rebels)
Conflict Events in Syrian Civil War
Description
A pooled dynamic network of combat events in the Syrian civil war between 2017 and 2019 with 4 timepoints. The raw data comes from the Armed Conflict Location & Event Data Project Raleigh et al. (2010).
Format
An undirected dynamic.sign object with no loops and eight timepoints.
References
Fritz C, Mehrl M, Thurner PW, Kauermann G (2023). “All that glitters is not gold: Relational events models with spurious events.” Network Science, 11(2), 184–204., Raleigh C, Linke r, Hegre H, Karlsen J (2010). “Introducing ACLED: An armed conflict location and event dataset.” Journal of peace research, 47(5), 651–660.
Examples
data(rebels)
Statnet Control
Description
A utility to facilitate argument completion of control lists, reexported from 'statnet.common'.
Currently recognised control parameters
This list is updated as packages are loaded and unloaded.
Package ergm
control.ergmdrop, init, init.method, main.method, force.main, main.hessian, checkpoint, resume, MPLE.samplesize, init.MPLE.samplesize, MPLE.type, MPLE.maxit, MPLE.nonvar, MPLE.nonident, MPLE.nonident.tol, MPLE.covariance.samplesize, MPLE.covariance.method, MPLE.covariance.sim.burnin, MPLE.covariance.sim.interval, MPLE.check, MPLE.constraints.ignore, MCMC.prop, MCMC.prop.weights, MCMC.prop.args, MCMC.interval, MCMC.burnin, MCMC.samplesize, MCMC.effectiveSize, MCMC.effectiveSize.damp, MCMC.effectiveSize.maxruns, MCMC.effectiveSize.burnin.pval, MCMC.effectiveSize.burnin.min, MCMC.effectiveSize.burnin.max, MCMC.effectiveSize.burnin.nmin, MCMC.effectiveSize.burnin.nmax, MCMC.effectiveSize.burnin.PC, MCMC.effectiveSize.burnin.scl, MCMC.effectiveSize.order.max, MCMC.return.stats, MCMC.runtime.traceplot, MCMC.maxedges, MCMC.addto.se, MCMC.packagenames, SAN.maxit, SAN.nsteps.times, SAN, MCMLE.termination, MCMLE.maxit, MCMLE.conv.min.pval, MCMLE.confidence, MCMLE.confidence.boost, MCMLE.confidence.boost.threshold, MCMLE.confidence.boost.lag, MCMLE.NR.maxit, MCMLE.NR.reltol, obs.MCMC.mul, obs.MCMC.samplesize.mul, obs.MCMC.samplesize, obs.MCMC.effectiveSize, obs.MCMC.interval.mul, obs.MCMC.interval, obs.MCMC.burnin.mul, obs.MCMC.burnin, obs.MCMC.prop, obs.MCMC.prop.weights, obs.MCMC.prop.args, obs.MCMC.impute.min_informative, obs.MCMC.impute.default_density, MCMLE.min.depfac, MCMLE.sampsize.boost.pow, MCMLE.MCMC.precision, MCMLE.MCMC.max.ESS.frac, MCMLE.metric, MCMLE.method, MCMLE.dampening, MCMLE.dampening.min.ess, MCMLE.dampening.level, MCMLE.steplength.margin, MCMLE.steplength, MCMLE.steplength.parallel, MCMLE.sequential, MCMLE.density.guard.min, MCMLE.density.guard, MCMLE.effectiveSize, obs.MCMLE.effectiveSize, MCMLE.interval, MCMLE.burnin, MCMLE.samplesize.per_theta, MCMLE.samplesize.min, MCMLE.samplesize, obs.MCMLE.samplesize.per_theta, obs.MCMLE.samplesize.min, obs.MCMLE.samplesize, obs.MCMLE.interval, obs.MCMLE.burnin, MCMLE.steplength.solver, MCMLE.last.boost, MCMLE.steplength.esteq, MCMLE.steplength.miss.sample, MCMLE.steplength.min, MCMLE.effectiveSize.interval_drop, MCMLE.save_intermediates, MCMLE.nonvar, MCMLE.nonident, MCMLE.nonident.tol, SA.phase1_n, SA.initial_gain, SA.nsubphases, SA.min_iterations, SA.max_iterations, SA.phase3_n, SA.interval, SA.burnin, SA.samplesize, CD.samplesize.per_theta, obs.CD.samplesize.per_theta, CD.nsteps, CD.multiplicity, CD.nsteps.obs, CD.multiplicity.obs, CD.maxit, CD.conv.min.pval, CD.NR.maxit, CD.NR.reltol, CD.metric, CD.method, CD.dampening, CD.dampening.min.ess, CD.dampening.level, CD.steplength.margin, CD.steplength, CD.adaptive.epsilon, CD.steplength.esteq, CD.steplength.miss.sample, CD.steplength.min, CD.steplength.parallel, CD.steplength.solver, loglik, term.options, seed, parallel, parallel.type, parallel.version.check, parallel.inherit.MT, ...control.ergm.bridgebridge.nsteps, bridge.target.se, bridge.bidirectional, drop, MCMC.burnin, MCMC.burnin.between, MCMC.interval, MCMC.samplesize, obs.MCMC.burnin, obs.MCMC.burnin.between, obs.MCMC.interval, obs.MCMC.samplesize, MCMC.prop, MCMC.prop.weights, MCMC.prop.args, obs.MCMC.prop, obs.MCMC.prop.weights, obs.MCMC.prop.args, MCMC.maxedges, MCMC.packagenames, term.options, seed, parallel, parallel.type, parallel.version.check, parallel.inherit.MT, ...control.ergm3drop, init, init.method, main.method, force.main, main.hessian, checkpoint, resume, MPLE.samplesize, init.MPLE.samplesize, MPLE.type, MPLE.maxit, MPLE.nonvar, MPLE.nonident, MPLE.nonident.tol, MPLE.covariance.samplesize, MPLE.covariance.method, MPLE.covariance.sim.burnin, MPLE.covariance.sim.interval, MPLE.check, MPLE.constraints.ignore, MCMC.prop, MCMC.prop.weights, MCMC.prop.args, MCMC.interval, MCMC.burnin, MCMC.samplesize, MCMC.effectiveSize, MCMC.effectiveSize.damp, MCMC.effectiveSize.maxruns, MCMC.effectiveSize.burnin.pval, MCMC.effectiveSize.burnin.min, MCMC.effectiveSize.burnin.max, MCMC.effectiveSize.burnin.nmin, MCMC.effectiveSize.burnin.nmax, MCMC.effectiveSize.burnin.PC, MCMC.effectiveSize.burnin.scl, MCMC.effectiveSize.order.max, MCMC.return.stats, MCMC.runtime.traceplot, MCMC.maxedges, MCMC.addto.se, MCMC.packagenames, SAN.maxit, SAN.nsteps.times, SAN, MCMLE.termination, MCMLE.maxit, MCMLE.conv.min.pval, MCMLE.confidence, MCMLE.confidence.boost, MCMLE.confidence.boost.threshold, MCMLE.confidence.boost.lag, MCMLE.NR.maxit, MCMLE.NR.reltol, obs.MCMC.mul, obs.MCMC.samplesize.mul, obs.MCMC.samplesize, obs.MCMC.effectiveSize, obs.MCMC.interval.mul, obs.MCMC.interval, obs.MCMC.burnin.mul, obs.MCMC.burnin, obs.MCMC.prop, obs.MCMC.prop.weights, obs.MCMC.prop.args, obs.MCMC.impute.min_informative, obs.MCMC.impute.default_density, MCMLE.min.depfac, MCMLE.sampsize.boost.pow, MCMLE.MCMC.precision, MCMLE.MCMC.max.ESS.frac, MCMLE.metric, MCMLE.method, MCMLE.dampening, MCMLE.dampening.min.ess, MCMLE.dampening.level, MCMLE.steplength.margin, MCMLE.steplength, MCMLE.steplength.parallel, MCMLE.sequential, MCMLE.density.guard.min, MCMLE.density.guard, MCMLE.effectiveSize, obs.MCMLE.effectiveSize, MCMLE.interval, MCMLE.burnin, MCMLE.samplesize.per_theta, MCMLE.samplesize.min, MCMLE.samplesize, obs.MCMLE.samplesize.per_theta, obs.MCMLE.samplesize.min, obs.MCMLE.samplesize, obs.MCMLE.interval, obs.MCMLE.burnin, MCMLE.steplength.solver, MCMLE.last.boost, MCMLE.steplength.esteq, MCMLE.steplength.miss.sample, MCMLE.steplength.min, MCMLE.effectiveSize.interval_drop, MCMLE.save_intermediates, MCMLE.nonvar, MCMLE.nonident, MCMLE.nonident.tol, SA.phase1_n, SA.initial_gain, SA.nsubphases, SA.min_iterations, SA.max_iterations, SA.phase3_n, SA.interval, SA.burnin, SA.samplesize, CD.samplesize.per_theta, obs.CD.samplesize.per_theta, CD.nsteps, CD.multiplicity, CD.nsteps.obs, CD.multiplicity.obs, CD.maxit, CD.conv.min.pval, CD.NR.maxit, CD.NR.reltol, CD.metric, CD.method, CD.dampening, CD.dampening.min.ess, CD.dampening.level, CD.steplength.margin, CD.steplength, CD.adaptive.epsilon, CD.steplength.esteq, CD.steplength.miss.sample, CD.steplength.min, CD.steplength.parallel, CD.steplength.solver, loglik, term.options, seed, parallel, parallel.type, parallel.version.check, parallel.inherit.MT, ...control.gof.ergmnsim, MCMC.burnin, MCMC.interval, MCMC.batch, MCMC.prop, MCMC.prop.weights, MCMC.prop.args, MCMC.maxedges, MCMC.packagenames, MCMC.runtime.traceplot, network.output, seed, parallel, parallel.type, parallel.version.check, parallel.inherit.MTcontrol.gof.formulansim, MCMC.burnin, MCMC.interval, MCMC.batch, MCMC.prop, MCMC.prop.weights, MCMC.prop.args, MCMC.maxedges, MCMC.packagenames, MCMC.runtime.traceplot, network.output, seed, parallel, parallel.type, parallel.version.check, parallel.inherit.MTcontrol.logLik.ergmbridge.nsteps, bridge.target.se, bridge.bidirectional, drop, MCMC.burnin, MCMC.interval, MCMC.samplesize, obs.MCMC.samplesize, obs.MCMC.interval, obs.MCMC.burnin, MCMC.prop, MCMC.prop.weights, MCMC.prop.args, obs.MCMC.prop, obs.MCMC.prop.weights, obs.MCMC.prop.args, MCMC.maxedges, MCMC.packagenames, term.options, seed, parallel, parallel.type, parallel.version.check, parallel.inherit.MT, ...control.sanSAN.maxit, SAN.tau, SAN.invcov, SAN.invcov.diag, SAN.nsteps.alloc, SAN.nsteps, SAN.samplesize, SAN.prop, SAN.prop.weights, SAN.prop.args, SAN.packagenames, SAN.ignore.finite.offsets, term.options, seed, parallel, parallel.type, parallel.version.check, parallel.inherit.MTcontrol.simulateMCMC.burnin, MCMC.interval, MCMC.prop, MCMC.prop.weights, MCMC.prop.args, MCMC.batch, MCMC.effectiveSize, MCMC.effectiveSize.damp, MCMC.effectiveSize.maxruns, MCMC.effectiveSize.burnin.pval, MCMC.effectiveSize.burnin.min, MCMC.effectiveSize.burnin.max, MCMC.effectiveSize.burnin.nmin, MCMC.effectiveSize.burnin.nmax, MCMC.effectiveSize.burnin.PC, MCMC.effectiveSize.burnin.scl, MCMC.effectiveSize.order.max, MCMC.maxedges, MCMC.packagenames, MCMC.runtime.traceplot, network.output, term.options, parallel, parallel.type, parallel.version.check, parallel.inherit.MT, ...control.simulate.ergmMCMC.burnin, MCMC.interval, MCMC.scale, MCMC.prop, MCMC.prop.weights, MCMC.prop.args, MCMC.batch, MCMC.effectiveSize, MCMC.effectiveSize.damp, MCMC.effectiveSize.maxruns, MCMC.effectiveSize.burnin.pval, MCMC.effectiveSize.burnin.min, MCMC.effectiveSize.burnin.max, MCMC.effectiveSize.burnin.nmin, MCMC.effectiveSize.burnin.nmax, MCMC.effectiveSize.burnin.PC, MCMC.effectiveSize.burnin.scl, MCMC.effectiveSize.order.max, MCMC.maxedges, MCMC.packagenames, MCMC.runtime.traceplot, network.output, term.options, parallel, parallel.type, parallel.version.check, parallel.inherit.MT, ...control.simulate.formulaMCMC.burnin, MCMC.interval, MCMC.prop, MCMC.prop.weights, MCMC.prop.args, MCMC.batch, MCMC.effectiveSize, MCMC.effectiveSize.damp, MCMC.effectiveSize.maxruns, MCMC.effectiveSize.burnin.pval, MCMC.effectiveSize.burnin.min, MCMC.effectiveSize.burnin.max, MCMC.effectiveSize.burnin.nmin, MCMC.effectiveSize.burnin.nmax, MCMC.effectiveSize.burnin.PC, MCMC.effectiveSize.burnin.scl, MCMC.effectiveSize.order.max, MCMC.maxedges, MCMC.packagenames, MCMC.runtime.traceplot, network.output, term.options, parallel, parallel.type, parallel.version.check, parallel.inherit.MT, ...control.simulate.formula.ergmMCMC.burnin, MCMC.interval, MCMC.prop, MCMC.prop.weights, MCMC.prop.args, MCMC.batch, MCMC.effectiveSize, MCMC.effectiveSize.damp, MCMC.effectiveSize.maxruns, MCMC.effectiveSize.burnin.pval, MCMC.effectiveSize.burnin.min, MCMC.effectiveSize.burnin.max, MCMC.effectiveSize.burnin.nmin, MCMC.effectiveSize.burnin.nmax, MCMC.effectiveSize.burnin.PC, MCMC.effectiveSize.burnin.scl, MCMC.effectiveSize.order.max, MCMC.maxedges, MCMC.packagenames, MCMC.runtime.traceplot, network.output, term.options, parallel, parallel.type, parallel.version.check, parallel.inherit.MT, ...
See Also
[statnet.common::snctrl()]
Common Sponsor Data for Syrian Civil War Factions
Description
A data frame containing binary indicators for whether each faction in the Syrian civil war is sponsored by a common external actor.
Format
A matrix with 68 rows and 68 columns.
References
Fritz C, Mehrl M, Thurner PW, Kauermann G (2023). “All that glitters is not gold: Relational events models with spurious events.” Network Science, 11(2), 184–204.
Examples
data(sponsor)
Network Attributes for Signed Networks
Description
Print descriptive statistics of a signed network.
Usage
## S3 method for class 'static.sign'
summary(object, ...)
## S3 method for class 'dynamic.sign'
summary(object, time = NULL, ...)
Arguments
object |
A signed network object of class |
... |
Additional arguments. |
time |
Integer vector of timepoints to summarize. Defaults to all. |
Value
A data frame or matrix with network attributes.
Static signed networks
summary.static.sign() summarizes a single (static) signed network.
See Also
Examples
data("tribes")
summary(tribes)
Summary formula method for dynamic signed networks
Description
Calculates statistics for dynamic.sign objects at specified timepoints.
Usage
## S3 method for class 'dynamic.sign'
summary_formula(object, at, ..., basis = NULL)
Arguments
object |
A formula with a dynamic.sign network as LHS. |
at |
Numeric vector of timepoints. Defaults to all if missing. |
... |
Additional arguments passed to summary_formula for network objects. |
basis |
Optional dynamic.sign network. If NULL, uses LHS network. |
Value
Matrix of statistics for each timepoint.
Read Highland Tribes
Description
A static network of political alliances and enmities among the 16 Gahuku-Gama sub-tribes of Eastern Central Highlands of New Guinea, documented by Read (1954).
Format
An undirected static.sign object with no loops.
References
Taken from UCINET IV, which cites the following: Hage P, Harary F (1983). Structural Models in Anthropology, Cambridge Studies in Social and Cultural Anthropology. Cambridge University Press. ISBN 9780521273114., Read KE (1954). “Cultures of the central highlands, New Guinea.” Southwestern Journal of Anthropology, 10(1), 1–43.
Examples
data(tribes)