hergm | R Documentation |
The function hergm
estimates and simulates three classes of hierarchical exponential-family random graph models:
1. The p_1 model of Holland and Leinhardt (1981) in exponential-family form and extensions by Vu, Hunter, and Schweinberger (2013) and Schweinberger, Petrescu-Prahova, and Vu (2014) to both directed and undirected random graphs with additional model terms, with and without covariates, and with parametric and nonparametric priors (see arcs_i
, arcs_j
, edges_i
, edges_ij
, mutual_i
, mutual_ij
).
2. The stochastic block model of Snijders and Nowicki (1997) and Nowicki and Snijders (2001) in exponential-family form and extensions by Vu, Hunter, and Schweinberger (2013) and Schweinberger, Petrescu-Prahova, and Vu (2014) with additional model terms, with and without covariates, and with parametric and nonparametric priors (see arcs_i
, arcs_j
, edges_i
, edges_ij
, mutual_i
, mutual_ij
).
3. The exponential-family random graph models with local dependence of Schweinberger and Handcock (2015), with and without covariates, and with parametric and nonparametric priors (see arcs_i
, arcs_j
, edges_i
, edges_ij
, mutual_i
, mutual_ij
, twostar_ijk
, triangle_ijk
, ttriple_ijk
, ctriple_ijk
).
The exponential-family random graph models with local dependence replace the long-range dependence of conventional exponential-family random graph models by short-range dependence.
Therefore, exponential-family random graph models with local dependence replace the strong dependence of conventional exponential-family random graph models by weak dependence,
reducing the problem of model degeneracy (Handcock, 2003; Schweinberger, 2011) and improving goodness-of-fit (Schweinberger and Handcock, 2015).
In addition, exponential-family random graph models with local dependence satisfy a weak form of self-consistency in the sense that these models are self-consistent under neighborhood sampling (Schweinberger and Handcock, 2015),
which enables consistent estimation of neighborhood-dependent parameters (Schweinberger and Stewart, 2017; Schweinberger, 2017).
hergm(formula, max_number = 2, hierarchical = TRUE, parametric = FALSE, parameterization = "offset", initialize = FALSE, initialization_method = 1, estimate_parameters = TRUE, initial_estimate = NULL, n_em_step_max = 100, max_iter = 4, perturb = FALSE, scaling = NULL, alpha = NULL, alpha_shape = NULL, alpha_rate = NULL, eta = NULL, eta_mean = NULL, eta_sd = NULL, eta_mean_mean = NULL, eta_mean_sd = NULL, eta_precision_shape = NULL, eta_precision_rate = NULL, mean_between = NULL, indicator = NULL, parallel = 1, simulate = FALSE, method = "ml", seeds = NULL, sample_size = NULL, sample_size_multiplier_blocks = 20, NR_max_iter = 200, NR_step_len = NULL, NR_step_len_multiplier = 0.2, interval = 1024, burnin = 16*interval, mh.scale = 0.25, variational = FALSE, temperature = c(1,100), predictions = FALSE, posterior.burnin = 2000, posterior.thinning = 1, relabel = 1, number_runs = 1, verbose = 0, ...)
formula |
formula of the form |
max_number |
maximum number of blocks. |
hierarchical |
hierarchical prior; if |
parametric |
parametric prior; if |
parameterization |
There are three possible parameterizations of within-block terms when using
|
initialize |
if |
initialization_method |
if |
estimate_parameters |
if |
initial_estimate |
if |
n_em_step_max |
if |
max_iter |
if |
perturb |
if |
scaling |
if |
alpha |
concentration parameter of truncated Dirichlet process prior of natural parameters of exponential-family model. |
alpha_shape, alpha_rate |
shape and rate parameter of Gamma prior of concentration parameter. |
eta |
the parameters of |
eta_mean, eta_sd |
means and standard deviations of Gaussian baseline distribution of Dirichlet process prior of natural parameters. |
eta_mean_mean, eta_mean_sd |
means and standard deviations of Gaussian prior of mean of Gaussian baseline distribution of Dirichlet process prior. |
eta_precision_shape, eta_precision_rate |
shape and rate (inverse scale) parameter of Gamma prior of precision parameter of Gaussian baseline distribution of Dirichlet process prior. |
mean_between |
if |
indicator |
if the indicators of block memberships of nodes are specified as integers between |
parallel |
number of computing nodes; if |
simulate |
if |
method |
if |
seeds |
seed of pseudo-random number generator; if |
sample_size |
if |
sample_size_multiplier_blocks |
if |
NR_max_iter |
if |
NR_step_len |
if |
NR_step_len_multiplier |
if |
interval |
if |
burnin |
if |
mh.scale |
if |
variational |
if |
temperature |
if |
predictions |
if |
posterior.burnin |
number of posterior burn-in iterations; if computing is parallel, |
posterior.thinning |
if |
relabel |
if |
number_runs |
if |
verbose |
if Progress: 50.00% of 1000000 ... means of block parameters: -0.2838 1.3323 precisions of block parameters: 0.9234 1.4682 block parameters: -0.2544 -0.2560 -0.1176 -0.0310 -0.1915 -1.9626 0.4022 1.8887 1.9719 0.6499 1.7265 0.0000 block indicators: 1 3 1 1 1 1 3 1 1 2 2 2 2 2 1 1 1 block sizes: 10 5 2 0 0 block probabilities: 0.5396 0.2742 0.1419 0.0423 0.0020 block probabilities prior parameter: 0.4256 posterior prediction of statistics: 66 123 where ... indicates additional information about the Markov chain Monte Carlo algorithm that is omitted here. The console output corresponds to: - "means of block parameters" correspond to the mean parameters of the Gaussian base distribution of parameters of - "precisions of block parameters" correspond to the precision parameters of the Gaussian base distribution of parameters of - "block parameters" correspond to the parameters of - "block indicators" correspond to the indicators of block memberships of nodes. - "block sizes" correspond to the block sizes. - "block probabilities" correspond to the prior probabilities of block memberships of nodes. - "block probabilities prior parameter" corresponds to the concentration parameter of truncated Dirichlet process prior of parameters of - if |
... |
additional arguments, to be passed to lower-level functions in the future. |
The function hergm
returns an object of class hergm
with components:
network |
|
formula |
formula of the form |
n |
number of nodes. |
hyper_prior |
indicator of whether hyper prior has been specified, i.e., whether the parameters |
alpha |
concentration parameter of truncated Dirichlet process prior of parameters of |
ergm_theta |
parameters of |
eta_mean |
mean parameters of Gaussian base distribution of parameters of |
eta_precision |
precision parameters of Gaussian base distribution of parameters of |
d1 |
total number of parameters of |
d2 |
total number of parameters of |
hergm_theta |
parameters of |
relabeled.hergm_theta |
relabeled parameters of |
number_fixed |
number of fixed indicators of block memberships of nodes. |
indicator |
indicators of block memberships of nodes. |
relabel |
if |
relabeled.indicator |
relabeled indicators of block memberships of nodes by using |
size |
the size of the blocks, i.e., the number of nodes of blocks. |
parallel |
number of computing nodes; if |
p_i_k |
posterior probabilities of block membership of nodes. |
p_k |
probabilities of block memberships of nodes. |
predictions |
if |
simulate |
if |
prediction |
posterior predictions of statistics. |
edgelist |
edge list of simulated network. |
sample_size |
if |
extract |
indicator of whether function |
verbose |
if |
Babkin, S., Stewart, J., Long, X., and M. Schweinberger (2020). Large-scale estimation of random graph models with local dependence. Computational Statistics and Data Analysis, 152, 1–19.
Cao, M., Chen, Y., Fujimoto, K., and M. Schweinberger (2018). A two-stage working model strategy for network analysis under hierarchical exponential random graph models. Proceedings of the 2018 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining, 290–298.
Handcock, M. S. (2003). Assessing degeneracy in statistical models of social networks. Technical report, Center for Statistics and the Social Sciences, University of Washington, Seattle. http://www.csss.washington.edu/Papers.
Holland, P. W. and S. Leinhardt (1981). An exponential family of probability distributions for directed graphs. Journal of the American Statistical Association, Theory & Methods, 76, 33–65.
Krivitsky, P. N., Handcock, M. S., & Morris, M. (2011). Adjusting for network size and composition effects in exponential-family random graph models. Statistical Methodology, 8(4), 319-339.
Krivitsky, P.N, and Kolaczyk, E. D. (2015). On the question of effective sample size in network modeling: An asymptotic inquiry. Statistical science: a review journal of the Institute of Mathematical Statistics, 30(2), 184.
Nowicki, K. and T. A. B. Snijders (2001). Estimation and prediction for stochastic blockstructures. Journal of the American Statistical Association, Theory & Methods, 96, 1077–1087.
Peng, L. and L. Carvalho (2016). Bayesian degree-corrected stochastic block models for community detection. Electronic Journal of Statistics 10, 2746–2779.
Schweinberger, M. (2011). Instability, sensitivity, and degeneracy of discrete exponential families. Journal of the American Statistical Association, Theory & Methods, 106, 1361–1370.
Schweinberger, M. (2020). Consistent structure estimation of exponential-family random graph models with block structure. Bernoulli, 26, 1205–1233.
Schweinberger, M. and M. S. Handcock (2015). Local dependence in random graph models: characterization, properties, and statistical inference. Journal of the Royal Statistical Society, Series B (Statistical Methodology), 7, 647-676.
Schweinberger, M., Krivitsky, P. N., Butts, C.T. and J. Stewart (2020). Exponential-family models of random graphs: Inference in finite, super, and infinite population scenarios. Statistical Science, 35, 627-662.
Schweinberger, M. and P. Luna (2018). HERGM: Hierarchical exponential-family random graph models. Journal of Statistical Software, 85, 1–39.
Schweinberger, M., Petrescu-Prahova, M. and D. Q. Vu (2014). Disaster response on September 11, 2001 through the lens of statistical network analysis. Social Networks, 37, 42–55.
Schweinberger, M. and J. Stewart (2020). Concentration and consistency results for canonical and curved exponential-family random graphs. The Annals of Statistics, 48, 374–396.
Snijders, T. A. B. and K. Nowicki (1997). Estimation and prediction for stochastic blockmodels for graphs with latent block structure. Journal of Classification, 14, 75–100.
Stewart, J., Schweinberger, M., Bojanowski, M., and M. Morris (2019). Multilevel network data facilitate statistical inference for curved ERGMs with geometrically weighted terms. Social Networks, 59, 98–119.
Vu, D. Q., Hunter, D. R. and M. Schweinberger (2013). Model-based clustering of large networks. Annals of Applied Statistics, 7, 1010–1039.
network, ergm.terms, hergm.terms, hergm.postprocess, summary, print, plot, gof, simulate
data(example) m <- summary(d ~ edges)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.