Postprocess object of class hergm

Share:

Description

The function hergm.postprocess postprocesses an object of class hergm. Please note that the function hergm calls the function hergm.postprocess with relabel = 0 by default or with other values of relabel specified by the user, therefore users do not need to call the function hergm.postprocess unless it is desired to postprocess an object of class hergm with a value of relabel that was not used by function hergm.

If hergm.postprocess is called with relabel > 0, it solves the so-called label-switching problem. The label-switching problem is rooted in the invariance of the likelihood function to permutations of the labels of blocks, and implies that raw MCMC samples from the posterior cannot be used to infer to block-dependent entities. The label-switching problem can be solved in a Bayesian decision-theoretic framework: by choosing a loss function and minimizing the posterior expected loss. Two loss functions are implemented in hergm.postprocess, the loss function of Schweinberger and Handcock (2015) (relabel == 1) and the loss function of Peng and Carvalho (2015) (relabel == 2). The first loss function seems to be superior in terms of the reported clustering probabilities, but is more expensive in terms of computing time. A rule of thumb is to use the first loss function when max_number < 15 and use the second loss function otherwise.

Usage

1
2
3
4
5
6
hergm.postprocess(object,
             burnin = 2000, 
             thinning = 1,
             relabel = 1,
             number_runs = 1,
             ...)

Arguments

object

object of class hergm; objects of class hergm can be generated by function hergm.

burnin

number of posterior burn-in iterations; if computing is parallel, burnin is applied to the sample generated by each processor; please note that hergm returns min(sample_size, 10000) sample points and the burn-in is applied to the sample of size min(sample_size, 10000), therefore burnin should be smaller than min(sample_size, 10000).

thinning

if thinning > 1, every thinning-th sample point is used while all others discarded; if computing is parallel, thinning is applied to the sample generated by each processor; please note that hergm returns min(sample_size, 10000) sample points and the thinning is applied to the sample of size min(sample_size, 10000) - burnin, therefore thinning should be smaller than min(sample_size, 10000) - burnin.

relabel

if relabel > 0, relabel MCMC sample by minimizing the posterior expected loss of Schweinberger and Handcock (2015) (relabel == 1) or Peng and Carvalho (2015) (relabel == 2).

number_runs

if relabel == 1, number of runs of relabeling algorithm.

...

additional arguments, to be passed to lower-level functions in the future.

Value

ergm_theta

parameters of ergm-terms.

alpha

concentration parameter of truncated Dirichlet process prior of parameters of hergm-terms.

eta_mean

mean parameters of Gaussian base distribution of parameters of hergm-terms.

eta_precision

precision parameters of Gaussian base distribution of parameters of hergm-terms.

hergm_theta

parameters of hergm-terms.

loss

if relabel == TRUE, local minimum of loss function.

p_k

probabilities of block memberships of nodes.

indicator

indicators of block memberships of nodes.

p_i_k

posterior probabilities of block memberships of nodes.

prediction

posterior predictions of statistics.

References

Peng, L. and L. Carvalho (2015). Bayesian degree-corrected stochastic block models for community detection. Technical report, Boston University, arXiv:1309.4796v1.

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.

See Also

hergm

Examples

1
2
3
4
5
## Not run: data(example)
object <- hergm(d ~ edges_ij + triangle_ijk)
hergm.postprocess(object)

## End(Not run)