View source: R/hergm.postprocess.R

hergm.postprocess | R Documentation |

`hergm`

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 (2016) (`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.

hergm.postprocess(object, burnin = 2000, thinning = 1, relabel = 1, number_runs = 1, ...)

`object` |
object of class |

`burnin` |
number of posterior burn-in iterations; if computing is parallel, |

`thinning` |
if |

`relabel` |
if |

`number_runs` |
if |

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

`ergm_theta` |
parameters of |

`alpha` |
concentration parameter of truncated Dirichlet process prior of parameters of |

`eta_mean` |
mean parameters of Gaussian base distribution of parameters of |

`eta_precision` |
precision parameters of Gaussian base distribution of parameters of |

`hergm_theta` |
parameters of |

`loss` |
if |

`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. |

Peng, L. and L. Carvalho (2016). Bayesian degree-corrected stochastic block models for community detection. Electronic Journal of Statistics 10, 2746–2779.

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. and P. Luna (2018). HERGM: Hierarchical exponential-family random graph models. Journal of Statistical Software, 85, 1–39.

hergm

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.