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.

1 2 3 4 5 6 | ```
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 (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.

hergm

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

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.