| Title: | Exponential-Family Models for Signed Networks |
|---|---|
| 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>. |
| Authors: | Marc Schalberger [cre], Cornelius Fritz [aut], Pavel Krivitsky [ctb] |
| Maintainer: | Marc Schalberger <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.2 |
| Built: | 2026-06-01 16:53:26 UTC |
| Source: | https://github.com/mschalberger/ergm.sign.statnet |
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.
#binary: CE(type="OTP")#binary: CE(type="OTP")
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. |
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 is an OTP shared partner of ordered
pair iff . Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex is an ITP shared partner of ordered
pair iff . Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex is an RTP shared partner of ordered
pair iff .
- Outgoing Shared Partner ('"OSP"'): vertex is an OSP shared partner of
ordered pair iff .
- Incoming Shared Partner ('"ISP"'): vertex is an ISP shared partner of ordered
pair iff .
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.
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.
['ergmTerm'] for index of model terms currently visible to the package.
None
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.
#binary: CF(type="OTP")#binary: CF(type="OTP")
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. |
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 is an OTP shared partner of ordered
pair iff . Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex is an ITP shared partner of ordered
pair iff . Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex is an RTP shared partner of ordered
pair iff .
- Outgoing Shared Partner ('"OSP"'): vertex is an OSP shared partner of
ordered pair iff .
- Incoming Shared Partner ('"ISP"'): vertex is an ISP shared partner of ordered
pair iff .
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.
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.
['ergmTerm'] for index of model terms currently visible to the package.
None
This term adds one network statistic to the model for each element in 'd' where the 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.
# binary: dse(d, type="OTP")# binary: dse(d, type="OTP")
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 is an OTP shared partner of ordered
pair iff . Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex is an ITP shared partner of ordered
pair iff . Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex is an RTP shared partner of ordered
pair iff .
- Outgoing Shared Partner ('"OSP"'): vertex is an OSP shared partner of
ordered pair iff .
- Incoming Shared Partner ('"ISP"'): vertex is an ISP shared partner of ordered
pair iff .
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.
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.
['ergmTerm'] for index of model terms currently visible to the package.
None
This term adds one network statistic to the model for each element in 'd' where the 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.
# binary: dsf(d, type="OTP")# binary: dsf(d, type="OTP")
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 is an OTP shared partner of ordered
pair iff . Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex is an ITP shared partner of ordered
pair iff . Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex is an RTP shared partner of ordered
pair iff .
- Outgoing Shared Partner ('"OSP"'): vertex is an OSP shared partner of
ordered pair iff .
- Incoming Shared Partner ('"ISP"'): vertex is an ISP shared partner of ordered
pair iff .
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.
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.
['ergmTerm'] for index of model terms currently visible to the package.
None
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.
ergm.sign( formula, estimate = "MLE", eval_lik = FALSE, ..., control = control.ergm() )ergm.sign( formula, estimate = "MLE", eval_lik = FALSE, ..., control = control.ergm() )
formula |
An |
eval_lik |
Logical indicating whether to evaluate the likelihood using path sampling. |
... |
Additional arguments passed to |
control |
A |
An ergm object.
Marc Schalberger
## Not run: ergm.sign(signed_net ~ edges + triangles) ## End(Not run)## Not run: ergm.sign(signed_net ~ edges + triangles) ## End(Not run)
This term adds one network statistic to the model for each element in 'd' where the 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.
# binary: ese(d, type="OTP", L.base=NULL)# binary: ese(d, type="OTP", L.base=NULL)
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 |
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 is an OTP shared partner of ordered
pair iff . Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex is an ITP shared partner of ordered
pair iff . Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex is an RTP shared partner of ordered
pair iff .
- Outgoing Shared Partner ('"OSP"'): vertex is an OSP shared partner of
ordered pair iff .
- Incoming Shared Partner ('"ISP"'): vertex is an ISP shared partner of ordered
pair iff .
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.
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.
['ergmTerm'] for index of model terms currently visible to the package.
None
This term adds one network statistic to the model for each element in 'd' where the 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.
# binary: esf(d, type="OTP", L.base=NULL)# binary: esf(d, type="OTP", L.base=NULL)
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 |
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 is an OTP shared partner of ordered
pair iff . Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex is an ITP shared partner of ordered
pair iff . Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex is an RTP shared partner of ordered
pair iff .
- Outgoing Shared Partner ('"OSP"'): vertex is an OSP shared partner of
ordered pair iff .
- Incoming Shared Partner ('"ISP"'): vertex is an ISP shared partner of ordered
pair iff .
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.
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.
['ergmTerm'] for index of model terms currently visible to the package.
None
This function evaluates the log-likelihood of a fitted signed ergm model using path sampling.
eval_loglik(object)eval_loglik(object)
object |
A fitted signed ergm model object. |
A logLik object containing the evaluated log-likelihood, degrees of freedom, and number of observations.
Conduct Goodness-of-Fit Diagnostics for a Signed ERGM
gof(model, ...) ## S3 method for class 'sign' gof(model, nsim = 200, seed = NULL, ...)gof(model, ...) ## S3 method for class 'sign' gof(model, nsim = 200, seed = NULL, ...)
model |
A fitted signed ERGM (SERGM) object of class |
... |
Additional arguments passed to methods. |
nsim |
Integer; number of simulated networks. Defaults to 200. |
seed |
Optional integer seed. |
An object of class "gof.sign".
Print shows a summary; plot() produces diagnostic boxplots.
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.
# binary: gwdse(decay, fixed=FALSE, cutoff=30, type="OTP")# binary: gwdse(decay, fixed=FALSE, cutoff=30, type="OTP")
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. |
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 is an OTP shared partner of ordered
pair iff . Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex is an ITP shared partner of ordered
pair iff . Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex is an RTP shared partner of ordered
pair iff .
- Outgoing Shared Partner ('"OSP"'): vertex is an OSP shared partner of
ordered pair iff .
- Incoming Shared Partner ('"ISP"'): vertex is an ISP shared partner of ordered
pair iff .
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.
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.
['ergmTerm'] for index of model terms currently visible to the package.
None
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.
# binary: gwdsf(decay, fixed=FALSE, cutoff=30, type="OTP")# binary: gwdsf(decay, fixed=FALSE, cutoff=30, type="OTP")
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. |
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 is an OTP shared partner of ordered
pair iff . Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex is an ITP shared partner of ordered
pair iff . Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex is an RTP shared partner of ordered
pair iff .
- Outgoing Shared Partner ('"OSP"'): vertex is an OSP shared partner of
ordered pair iff .
- Incoming Shared Partner ('"ISP"'): vertex is an ISP shared partner of ordered
pair iff .
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.
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.
['ergmTerm'] for index of model terms currently visible to the package.
None
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.
# binary: gwese(decay, fixed=FALSE, cutoff=30, type="OTP", base=NULL)# binary: gwese(decay, fixed=FALSE, cutoff=30, type="OTP", base=NULL)
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 |
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 is an OTP shared partner of ordered
pair iff . Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex is an ITP shared partner of ordered
pair iff . Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex is an RTP shared partner of ordered
pair iff .
- Outgoing Shared Partner ('"OSP"'): vertex is an OSP shared partner of
ordered pair iff .
- Incoming Shared Partner ('"ISP"'): vertex is an ISP shared partner of ordered
pair iff .
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.
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.
['ergmTerm'] for index of model terms currently visible to the package.
None
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.
# binary: gwesf(decay, fixed=FALSE, cutoff=30, type="OTP", base=NULL)# binary: gwesf(decay, fixed=FALSE, cutoff=30, type="OTP", base=NULL)
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 |
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 is an OTP shared partner of ordered
pair iff . Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex is an ITP shared partner of ordered
pair iff . Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex is an RTP shared partner of ordered
pair iff .
- Outgoing Shared Partner ('"OSP"'): vertex is an OSP shared partner of
ordered pair iff .
- Incoming Shared Partner ('"ISP"'): vertex is an ISP shared partner of ordered
pair iff .
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.
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.
['ergmTerm'] for index of model terms currently visible to the package.
None
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.
# binary: gwnse(decay, fixed=FALSE, cutoff=30, type="OTP", base=NULL)# binary: gwnse(decay, fixed=FALSE, cutoff=30, type="OTP", base=NULL)
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 |
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 is an OTP shared partner of ordered
pair iff . Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex is an ITP shared partner of ordered
pair iff . Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex is an RTP shared partner of ordered
pair iff .
- Outgoing Shared Partner ('"OSP"'): vertex is an OSP shared partner of
ordered pair iff .
- Incoming Shared Partner ('"ISP"'): vertex is an ISP shared partner of ordered
pair iff .
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.
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.
['ergmTerm'] for index of model terms currently visible to the package.
None
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.
# binary: gwnsf(decay, fixed=FALSE, cutoff=30, type="OTP", base=NULL)# binary: gwnsf(decay, fixed=FALSE, cutoff=30, type="OTP", base=NULL)
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 |
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 is an OTP shared partner of ordered
pair iff . Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex is an ITP shared partner of ordered
pair iff . Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex is an RTP shared partner of ordered
pair iff .
- Outgoing Shared Partner ('"OSP"'): vertex is an OSP shared partner of
ordered pair iff .
- Incoming Shared Partner ('"ISP"'): vertex is an ISP shared partner of ordered
pair iff .
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.
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.
['ergmTerm'] for index of model terms currently visible to the package.
None
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.
# binary: delnodematch(attr)# binary: delnodematch(attr)
attr |
character attribute name to copy from the previous network into the current. |
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).
# binary: delrecip(base)# binary: delrecip(base)
base |
character or numeric name/identifier of the layer to examine in the current network. |
Evaluates the terms in 'formula' of the negative edges and sums the results elementwise.
# binary: Neg(formula)# binary: Neg(formula)
formula |
a one-sided [ergm()]-style formula with the terms to be evaluated |
Evaluates the terms in 'formula' of the positive edges and sums the results elementwise.
# binary: Pos(formula)# binary: Pos(formula)
formula |
a one-sided [ergm()]-style formula with the terms to be evaluated |
Returns a fitted logistic regression model used to calculate the maximum pseudolikelihood estimate (MPLE) of an exponential random graph model (ERGM).
mple_sign( formula, control = control.ergm(), seed = NULL, eval_lik = FALSE, ... )mple_sign( formula, control = control.ergm(), seed = NULL, eval_lik = FALSE, ... )
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 |
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.
An object of class ergm.
data(tribes) mple_sign(tribes ~ Pos(~edges) + Neg(~edges))data(tribes) mple_sign(tribes ~ Pos(~edges) + Neg(~edges))
Turn adjacency matrices or edgelists into static or dynamic signed networks.
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"), ... )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"), ... )
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'. |
A signed network of class 'static.sign' or 'dynamic.sign'.
Creates a composite network object from multiple signed networks, suitable for ERGM modeling. Can represent either a multilayer or dynamic signed network structure.
networks.sign(..., dynamic = FALSE, dual.sign = FALSE)networks.sign(..., dynamic = FALSE, dual.sign = FALSE)
... |
One or more signed networks (objects of class |
dynamic |
Logical. If |
dual.sign |
Logical. If |
A combined network object of class "multi.sign" or
"dynamic.sign", with the appropriate ERGM constraint formula.
data("tribes") multi_net <- networks.sign(tribes, tribes) dyn_net <- networks.sign(list(tribes, tribes), dynamic = TRUE)data("tribes") multi_net <- networks.sign(tribes, tribes) dyn_net <- networks.sign(list(tribes, tribes), dynamic = TRUE)
This term adds one network statistic to the model for each element in 'd' where the 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.
# binary: nse(d, type="OTP", base=NULL)# binary: nse(d, type="OTP", base=NULL)
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 |
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 is an OTP shared partner of ordered
pair iff . Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex is an ITP shared partner of ordered
pair iff . Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex is an RTP shared partner of ordered
pair iff .
- Outgoing Shared Partner ('"OSP"'): vertex is an OSP shared partner of
ordered pair iff .
- Incoming Shared Partner ('"ISP"'): vertex is an ISP shared partner of ordered
pair iff .
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.
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.
['ergmTerm'] for index of model terms currently visible to the package.
None
This term adds one network statistic to the model for each element in 'd' where the 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.
# binary: nsf(d, type="OTP", base=NULL)# binary: nsf(d, type="OTP", base=NULL)
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 |
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 is an OTP shared partner of ordered
pair iff . Also known as "transitive
shared partner".
- Incoming Two-path ('"ITP"'): vertex is an ITP shared partner of ordered
pair iff . Also known as "cyclical shared
partner"
- Reciprocated Two-path ('"RTP"'): vertex is an RTP shared partner of ordered
pair iff .
- Outgoing Shared Partner ('"OSP"'): vertex is an OSP shared partner of
ordered pair iff .
- Incoming Shared Partner ('"ISP"'): vertex is an ISP shared partner of ordered
pair iff .
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.
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.
['ergmTerm'] for index of model terms currently visible to the package.
None
plot.dynamic.sign() visualizes a dynamic signed network over multiple timepoints.
## S3 method for class 'dynamic.sign' plot( x, col_pos = "#008000", col_neg = "#E3000F", col_both = "#333333", neg.lty = 1, both.lty = 1, inv_weights = TRUE, time = NULL, titles = x %n% "names", fix.pos = TRUE, coord = NULL, ... )## S3 method for class 'dynamic.sign' plot( x, col_pos = "#008000", col_neg = "#E3000F", col_both = "#333333", neg.lty = 1, both.lty = 1, inv_weights = TRUE, time = NULL, titles = x %n% "names", fix.pos = TRUE, coord = NULL, ... )
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. |
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. |
A list of plots, one for each selected timepoint.
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.
Functions to visualize signed networks in static or dynamic form.
## S3 method for class 'static.sign' plot( x, col_pos = "#008000", col_neg = "#E3000F", col_both = "#333333", neg.lty = 1, both.lty = 1, inv_weights = TRUE, coord = NULL, ... )## S3 method for class 'static.sign' plot( x, col_pos = "#008000", col_neg = "#E3000F", col_both = "#333333", neg.lty = 1, both.lty = 1, inv_weights = TRUE, coord = NULL, ... )
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. |
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. |
A plot of the signed network.
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.
plot.static.sign() visualizes a single (static) signed network.
Gansner ER, Koren Y, North S (2004). “Graph drawing by stress majorization.” In International Symposium on Graph Drawing, 239–250. Springer.
data("tribes") plot(tribes, col_pos = "green", col_neg = "red")data("tribes") plot(tribes, col_pos = "green", col_neg = "red")
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).
An undirected dynamic.sign object with no loops and eight timepoints.
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.
data(rebels)data(rebels)
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).
An undirected dynamic.sign object with no loops and eight timepoints.
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.
data(rebels)data(rebels)
'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.
Signed( ..., dual.sign = FALSE, .symmetric = NULL, .bipartite = NULL, .active = NULL )Signed( ..., dual.sign = FALSE, .symmetric = NULL, .bipartite = NULL, .active = NULL )
... |
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. |
A combined multilayer ['network'] object as returned by [Layer()], with two layers named '"pos"' and '"neg"'.
[Layer()] for the underlying multilayer construction; ['ergm'][ergm::ergm] for model fitting on the resulting network.
# 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))# 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))
A utility to facilitate argument completion of control lists, reexported from 'statnet.common'.
This list is updated as packages are loaded and unloaded.
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.MT
control.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.MT
control.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.MT
control.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, ...
[statnet.common::snctrl()]
A data frame containing binary indicators for whether each faction in the Syrian civil war is sponsored by a common external actor.
A matrix with 68 rows and 68 columns.
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.
data(sponsor)data(sponsor)
Calculates statistics for dynamic.sign objects at specified timepoints.
## S3 method for class 'dynamic.sign' summary_formula(object, at, ..., basis = NULL)## S3 method for class 'dynamic.sign' summary_formula(object, at, ..., basis = NULL)
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. |
Matrix of statistics for each timepoint.
Print descriptive statistics of a signed network.
## S3 method for class 'static.sign' summary(object, ...) ## S3 method for class 'dynamic.sign' summary(object, time = NULL, ...)## S3 method for class 'static.sign' summary(object, ...) ## S3 method for class 'dynamic.sign' summary(object, time = NULL, ...)
object |
A signed network object of class |
... |
Additional arguments. |
time |
Integer vector of timepoints to summarize. Defaults to all. |
A data frame or matrix with network attributes.
summary.static.sign() summarizes a single (static) signed network.
data("tribes") summary(tribes)data("tribes") summary(tribes)
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).
An undirected static.sign object with no loops.
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.
data(tribes)data(tribes)
Turn a multilayer network object into a single layer network object.
UnLayer( net, color_pos = "#008000", color_neg = "#E3000F", color_both = "#333333", neg.lty = 2, both.lty = 2 )UnLayer( net, color_pos = "#008000", color_neg = "#E3000F", color_both = "#333333", neg.lty = 2, both.lty = 2 )
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. |
Single layer network object or a list of network objects for dynamic.sign.
data("tribes") tribes_sgl <- UnLayer(tribes)data("tribes") tribes_sgl <- UnLayer(tribes)